netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next] Parse FQ band weights correctly
@ 2025-06-03  3:40 vmalla
  2025-06-03  6:25 ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: vmalla @ 2025-06-03  3:40 UTC (permalink / raw)
  To: netdev; +Cc: dsahern, stephen, edumazet, vmalla

From: Hemanth Malla <vmalla@microsoft.com>

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>
---
 tc/q_fq.c | 1 -
 1 file changed, 1 deletion(-)

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;

--
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2-next] Parse FQ band weights correctly
  2025-06-03  3:40 [PATCH iproute2-next] Parse FQ band weights correctly vmalla
@ 2025-06-03  6:25 ` Eric Dumazet
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2025-06-03  6:25 UTC (permalink / raw)
  To: vmalla; +Cc: netdev, dsahern, stephen, vmalla

On Mon, Jun 2, 2025 at 8:41 PM <vmalla@linux.microsoft.com> wrote:
>
> From: Hemanth Malla <vmalla@microsoft.com>
>
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-03  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03  3:40 [PATCH iproute2-next] Parse FQ band weights correctly vmalla
2025-06-03  6:25 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).