All of lore.kernel.org
 help / color / mirror / Atom feed
From: vmalla@linux.microsoft.com
To: netdev@vger.kernel.org
Cc: dsahern@gmail.com, stephen@networkplumber.org,
	edumazet@google.com, vmalla@microsoft.com
Subject: [PATCH iproute2-next] Parse FQ band weights correctly
Date: Mon,  2 Jun 2025 20:40:42 -0700	[thread overview]
Message-ID: <1748922042-32491-1-git-send-email-vmalla@linux.microsoft.com> (raw)

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


             reply	other threads:[~2025-06-03  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03  3:40 vmalla [this message]
2025-06-03  6:25 ` [PATCH iproute2-next] Parse FQ band weights correctly Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1748922042-32491-1-git-send-email-vmalla@linux.microsoft.com \
    --to=vmalla@linux.microsoft.com \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vmalla@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.