]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Parse FQ band weights correctly
authorHemanth Malla <vmalla@microsoft.com>
Thu, 5 Jun 2025 15:56:07 +0000 (08:56 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 5 Jun 2025 15:57:11 +0000 (08:57 -0700)
Currently, NEXT_ARG() is called twice resulting in the first
weight being skipped. This results in the following errors:

$ sudo tc qdisc replace dev enP64183s1 root fq weights 589824 196608 65536
Not enough elements in weights

$ sudo tc qdisc replace dev enP64183s1 root fq weights 589824 196608 65536 nopacing
Illegal "weights" element, positive number expected

Fixes: 567eb4e41045 ("tc: fq: add TCA_FQ_WEIGHTS handling")
Signed-off-by: Hemanth Malla <vmalla@microsoft.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/q_fq.c

index 51a43122bd5705f9cdf59c5974e995d8bc38f245..13c5a89603fc40cd832c794bfe300f66881905ac 100644 (file)
--- a/tc/q_fq.c
+++ b/tc/q_fq.c
@@ -258,7 +258,6 @@ static int fq_parse_opt(const struct qdisc_util *qu, int argc, char **argv,
                                fprintf(stderr, "Duplicate \"weights\"\n");
                                return -1;
                        }
-                       NEXT_ARG();
                        for (idx = 0; idx < FQ_BANDS; ++idx) {
                                int val;