]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: cfgparse-quic: fix warning for cc-aglo with 0 burst
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 Nov 2024 10:15:47 +0000 (11:15 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 Nov 2024 10:26:36 +0000 (11:26 +0100)
Optional burst argument for quic-cc-algo is used to toggle pacing
support on top of cubic. This is the case if it is positive.

The default value is 0, which do not activate pacing. However, in this
case, an incorrect warning is reported about the parameter being
ignored. Fix this by removing the warning in this case.

No need to backport.

src/cfgparse-quic.c

index 5d55eaf736380e2b89cbc09993b7b44f85d185b6..73e252e71f56a3339504bf83cadbadd3e1e7cea5 100644 (file)
@@ -188,7 +188,11 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px,
                        if (burst < 0)
                                goto fail;
 
-                       if (burst && cc_algo->type == QUIC_CC_ALGO_TP_CUBIC) {
+                       if (cc_algo->type != QUIC_CC_ALGO_TP_CUBIC) {
+                               ha_warning("'%s' : burst parameter ignored for '%s' congestion algorithm\n",
+                                          args[cur_arg], algo);
+                       }
+                       else if (burst) {
                                if (!experimental_directives_allowed) {
                                        memprintf(err, "'%s' : support for pacing is experimental, must be allowed via a global "
                                                  "'expose-experimental-directives'\n", args[cur_arg]);
@@ -199,10 +203,6 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px,
                                cc_algo->pacing_rate = quic_cc_default_pacing_rate;
                                cc_algo->pacing_burst = quic_cc_default_pacing_burst;
                        }
-                       else {
-                               ha_warning("'%s' : burst parameter ignored for '%s' congestion algorithm\n",
-                                          args[cur_arg], algo);
-                       }
 
                        if (*end_opt == ')') {
                                goto out;