Parse FQ band weights correctly

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>
This commit is contained in:
Hemanth Malla 2025-06-05 08:56:07 -07:00 committed by Stephen Hemminger
parent 605a282a10
commit 77021bcb4f

View File

@ -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;