Skip to content

Commit 3499546

Browse files
committed
MINOR: quic: add "bbr" new "quic-cc-algo" option
Add this new "bbr" option to the list of the congestion control algorithms which may be set by "quic-cc-algo" setting. This new algorithm is considered as experimental and may be enabled only if "expose-experimental-directive" is set. Also update the documentation for this new setting.
1 parent e778b9a commit 3499546

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

doc/configuration.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17199,7 +17199,7 @@ proto <name>
1719917199
instance, it is possible to force the http/2 on clear TCP by specifying "proto
1720017200
h2" on the bind line.
1720117201

17202-
quic-cc-algo { cubic[-pacing] | newreno | nocc }[(<args,...>)]
17202+
quic-cc-algo { cubic[-pacing] | newreno | bbr | nocc }[(<args,...>)]
1720317203
This is a QUIC specific setting to select the congestion control algorithm
1720417204
for any connection attempts to the configured QUIC listeners. They are similar
1720517205
to those used by TCP.
@@ -17212,7 +17212,10 @@ quic-cc-algo { cubic[-pacing] | newreno | nocc }[(<args,...>)]
1721217212
scenario, it can significantly improve network throughput. However, it can
1721317213
also increase CPU usage if haproxy is forced to wait too long between each
1721417214
emission. Pacing support is still experimental, as such it requires
17215-
"expose-experimental-directives".
17215+
"expose-experimental-directives". BBR congestion control algorithm depends on
17216+
the pacing support which is in this case implicitely activated by "bbr".
17217+
Note that BBR haproxy implementation is still considered as experimental and
17218+
cannot be enabled without "expose-experimental-directives".
1721617219

1721717220
For further customization, a list of parameters can be specified after the
1721817221
algorithm token. It must be written between parenthesis, separated by a comma

src/cfgparse-quic.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#define QUIC_CC_NEWRENO_STR "newreno"
2121
#define QUIC_CC_CUBIC_STR "cubic"
22+
#define QUIC_CC_BBR_STR "bbr"
2223
#define QUIC_CC_NO_CC_STR "nocc"
2324

2425
static int bind_parse_quic_force_retry(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
@@ -141,6 +142,18 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px,
141142
arg += strlen(str_pacing);
142143
}
143144
}
145+
else if (strncmp(arg, QUIC_CC_BBR_STR, strlen(QUIC_CC_BBR_STR)) == 0) {
146+
if (!experimental_directives_allowed) {
147+
ha_alert("'%s' algo is experimental, must be allowed via a global "
148+
"'expose-experimental-directives'\n", arg);
149+
goto fail;
150+
}
151+
152+
/* bbr */
153+
algo = QUIC_CC_BBR_STR;
154+
cc_algo = &quic_cc_algo_bbr;
155+
arg += strlen(QUIC_CC_BBR_STR);
156+
}
144157
else if (strncmp(arg, QUIC_CC_NO_CC_STR, strlen(QUIC_CC_NO_CC_STR)) == 0) {
145158
/* nocc */
146159
if (!experimental_directives_allowed) {

0 commit comments

Comments
 (0)