diff --git a/src/shrpx.cc b/src/shrpx.cc index f81add5d..9bdcb34c 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -3369,12 +3369,15 @@ HTTP/3 and QUIC: NEW_TOKEN frame in the previous connection. --frontend-quic-congestion-controller= Specify a congestion controller algorithm for a frontend - QUIC connection. should be either "cubic" or - "bbr". + QUIC connection. should be one of "cubic", "bbr", + and "bbr2". Default: )" << (config->quic.upstream.congestion_controller == NGTCP2_CC_ALGO_CUBIC ? "cubic" - : "bbr") + : (config->quic.upstream.congestion_controller == + NGTCP2_CC_ALGO_BBR + ? "bbr" + : "bbr2")) << R"( --frontend-quic-secret-file= Path to file that contains secure random data to be used diff --git a/src/shrpx_config.cc b/src/shrpx_config.cc index e158ba6d..19c34180 100644 --- a/src/shrpx_config.cc +++ b/src/shrpx_config.cc @@ -4111,8 +4111,10 @@ int parse_config(Config *config, int optid, const StringRef &opt, config->quic.upstream.congestion_controller = NGTCP2_CC_ALGO_CUBIC; } else if (util::strieq_l("bbr", optarg)) { config->quic.upstream.congestion_controller = NGTCP2_CC_ALGO_BBR; + } else if (util::strieq_l("bbr2", optarg)) { + config->quic.upstream.congestion_controller = NGTCP2_CC_ALGO_BBR2; } else { - LOG(ERROR) << opt << ": must be either cubic or bbr"; + LOG(ERROR) << opt << ": must be one of cubic, bbr, and bbr2"; return -1; } #endif // ENABLE_HTTP3 diff --git a/src/shrpx_http3_upstream.cc b/src/shrpx_http3_upstream.cc index 4551dfed..12299360 100644 --- a/src/shrpx_http3_upstream.cc +++ b/src/shrpx_http3_upstream.cc @@ -745,7 +745,11 @@ int Http3Upstream::write_streams() { auto config = get_config(); auto &quicconf = config->quic; - if (quicconf.upstream.congestion_controller != NGTCP2_CC_ALGO_BBR) { + switch (quicconf.upstream.congestion_controller) { + case NGTCP2_CC_ALGO_BBR: + case NGTCP2_CC_ALGO_BBR2: + break; + default: max_pktcnt = std::min(max_pktcnt, static_cast(10)); }