From: Hemanth Malla Date: Thu, 5 Jun 2025 15:56:07 +0000 (-0700) Subject: Parse FQ band weights correctly X-Git-Tag: v6.16.0~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=77021bcb4f0828bba4d17951136105aa629ecb3d;p=thirdparty%2Fiproute2.git 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 Reviewed-by: Eric Dumazet Signed-off-by: Stephen Hemminger --- diff --git a/tc/q_fq.c b/tc/q_fq.c index 51a43122..13c5a896 100644 --- 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;