From: Mohsin Bashir <mohsin.bashr@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, ast@fiberby.net, chuck.lever@oracle.com,
davem@davemloft.net, donald.hunter@gmail.com,
edumazet@google.com, horms@kernel.org,
linux-kernel@vger.kernel.org, matttbe@kernel.org,
pabeni@redhat.com
Subject: Re: [PATCH net-next] net: shaper: Reject zero weight in shaper config
Date: Mon, 13 Apr 2026 19:25:49 -0700 [thread overview]
Message-ID: <32dafe85-d6bf-4f64-a9f7-124d0bd677d5@gmail.com> (raw)
In-Reply-To: <20260413145039.43f7b162@kernel.org>
On 4/13/26 2:50 PM, Jakub Kicinski wrote:
> On Fri, 10 Apr 2026 15:51:23 -0700 Mohsin Bashir wrote:
>> A zero weight is meaningless for DWRR scheduling and can cause
>> starvation of the affected node. Add a min-value constraint to
>> the weight attribute in the net_shaper netlink spec so that zero
>> is rejected at the netlink policy level.
>>
>> Found while prototyping a new driver, existing drivers are not
>> affected.
>
> AI review points out that if the netlink attr is not present core will
> leave the DWRR weight as 0 in the struct. I guess we need to think this
> thru a little more carefully. What should the "default" weight be?
> What if user specifies weights only for subset of leaves?
>
> This part of the uAPI seems under-defined.
>
> Maybe a better adjustment would be to make core set the weight to 1
> automatically if the user has not defined it? Only when sending it to
> the driver tho, because we'd still want it to not be reported back to
> user space. Not sure how hairy it'd get code-wise.
Interesting!!
Let me look at the big picture here and re-spin.
prev parent reply other threads:[~2026-04-14 2:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 22:51 [PATCH net-next] net: shaper: Reject zero weight in shaper config Mohsin Bashir
2026-04-13 21:50 ` Jakub Kicinski
2026-04-14 2:25 ` Mohsin Bashir [this message]
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=32dafe85-d6bf-4f64-a9f7-124d0bd677d5@gmail.com \
--to=mohsin.bashr@gmail.com \
--cc=ast@fiberby.net \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox