]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: add "bbr" new "quic-cc-algo" option
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 29 Oct 2024 18:08:06 +0000 (19:08 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 20 Nov 2024 16:34:22 +0000 (17:34 +0100)
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.

doc/configuration.txt
src/cfgparse-quic.c

index ba2f114be1148ceeff8e5274f8792b1995992947..84f00ade67acea95e2db3c0ed7b766b3cc17ca2d 100644 (file)
@@ -17199,7 +17199,7 @@ proto <name>
   instance, it is possible to force the http/2 on clear TCP by specifying "proto
   h2" on the bind line.
 
-quic-cc-algo { cubic[-pacing] | newreno | nocc }[(<args,...>)]
+quic-cc-algo { cubic[-pacing] | newreno | bbr | nocc }[(<args,...>)]
   This is a QUIC specific setting to select the congestion control algorithm
   for any connection attempts to the configured QUIC listeners. They are similar
   to those used by TCP.
@@ -17212,7 +17212,10 @@ quic-cc-algo { cubic[-pacing] | newreno | nocc }[(<args,...>)]
   scenario, it can significantly improve network throughput. However, it can
   also increase CPU usage if haproxy is forced to wait too long between each
   emission. Pacing support is still experimental, as such it requires
-  "expose-experimental-directives".
+  "expose-experimental-directives". BBR congestion control algorithm depends on
+  the pacing support which is in this case implicitely activated by "bbr".
+  Note that BBR haproxy implementation is still considered as experimental and
+  cannot be enabled without "expose-experimental-directives".
 
   For further customization, a list of parameters can be specified after the
   algorithm token. It must be written between parenthesis, separated by a comma
index 8992bfb3da7a5fa62523e3cdd85965212776bdf0..1b68386a5f95e1971fa52d733329792509e9843b 100644 (file)
@@ -19,6 +19,7 @@
 
 #define QUIC_CC_NEWRENO_STR "newreno"
 #define QUIC_CC_CUBIC_STR   "cubic"
+#define QUIC_CC_BBR_STR     "bbr"
 #define QUIC_CC_NO_CC_STR   "nocc"
 
 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,
                        arg += strlen(str_pacing);
                }
        }
+       else if (strncmp(arg, QUIC_CC_BBR_STR, strlen(QUIC_CC_BBR_STR)) == 0) {
+               if (!experimental_directives_allowed) {
+                       ha_alert("'%s' algo is experimental, must be allowed via a global "
+                                "'expose-experimental-directives'\n", arg);
+                       goto fail;
+               }
+
+               /* bbr */
+               algo = QUIC_CC_BBR_STR;
+               cc_algo = &quic_cc_algo_bbr;
+               arg += strlen(QUIC_CC_BBR_STR);
+       }
        else if (strncmp(arg, QUIC_CC_NO_CC_STR, strlen(QUIC_CC_NO_CC_STR)) == 0) {
                /* nocc */
                if (!experimental_directives_allowed) {