Parse FQ band weights correctly
Subsystems (2)
PATCH 1/1 Parse FQ band weights correctly
From: Hemanth Malla <[email protected]>
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 <[email protected]>
--- tc/q_fq.c | 1 - 1 file changed, 1 deletion(-)
tc/q_fq.c +0 -1
@@ -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;
--
2.43.0
Quoted 6 lines · On Mon, Jun 2, 2025 at 8:41 PM <[email protected]> wrote:
From: Hemanth Malla <[email protected]>
Currently,
NEXT_ARG()is called twice resulting in the first weight being skipped. This results in the following errors:
Quoted 8 lines
$ 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 expectedFixes 567eb4e41045 ("tc: fq: add TCA_FQ_WEIGHTS handling")Signed-off-by Hemanth Malla <[email protected]>
Reviewed-by Eric Dumazet <[email protected]>