From: Jakub Kicinski <kuba@kernel.org>
To: Matthias Tafelmeier <matthias.tafelmeier@gmx.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH net] net: reject dev_weight products that overflow int
Date: Fri, 23 Oct 2026 13:08:12 -0700 [thread overview]
Message-ID: <20261023130812.1ba2462a@kernel.org> (raw)
In-Reply-To: <607851eb-e42b-46bc-928f-91db542fa9c0@gmx.net>
On Fri, 23 Oct 2026 21:32:40 +0200 Matthias Tafelmeier wrote:
> On 10/23/26 21:31, Jakub Kicinski wrote:
> > On Fri, 23 Oct 2026 19:42:25 +0800 Jiayuan Chen wrote:
> >> proc_do_dev_weight() sets the backlog NAPI weight and the qdisc quota
> >> to dev_weight * dev_weight_rx_bias and dev_weight * dev_weight_tx_bias.
> >> The three sysctls only have a lower bound of 1, so the products can
> >> overflow int and end up <= 0, e.g. dev_weight=65536 and
> >> dev_weight_rx_bias=65536 give a backlog weight of 0.
> > Not sure anyone uses these, maybe we could cap them?
> > 1k for dev weight 8 for bias?
>
> Capping does not make sense to me.
Please don't email people off list.
What are the values you know of being used in production?
next prev parent reply other threads:[~2026-10-23 20:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 11:42 [PATCH net] net: reject dev_weight products that overflow int Jiayuan Chen
2026-10-23 11:46 ` netdev-bot+sinfo
2026-10-23 11:54 ` Matthias Tafelmeier
2026-10-23 19:31 ` Jakub Kicinski
[not found] ` <607851eb-e42b-46bc-928f-91db542fa9c0@gmx.net>
2026-10-23 20:08 ` Jakub Kicinski [this message]
2026-10-24 8:59 ` Jason Xing
2026-10-24 19:50 ` Matthias Tafelmeier
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=20261023130812.1ba2462a@kernel.org \
--to=kuba@kernel.org \
--cc=matthias.tafelmeier@gmx.net \
--cc=netdev@vger.kernel.org \
/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