[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260206191308.7fdbfef4@kernel.org>
Date: Fri, 6 Feb 2026 19:13:08 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Srujana Challa <schalla@...vell.com>
Cc: <netdev@...r.kernel.org>, <virtualization@...ts.linux.dev>,
<pabeni@...hat.com>, <mst@...hat.com>, <jasowang@...hat.com>,
<xuanzhuo@...ux.alibaba.com>, <eperezma@...hat.com>, <davem@...emloft.net>,
<edumazet@...gle.com>, <ndabilpuram@...vell.com>, <kshankar@...vell.com>
Subject: Re: [PATCH v2 net-next] virtio_net: Improve RSS key size validation
and use NETDEV_RSS_KEY_LEN
On Fri, 6 Feb 2026 17:31:54 +0530 Srujana Challa wrote:
> Replace hardcoded RSS max key size limit with NETDEV_RSS_KEY_LEN to
> align with kernel's standard RSS key length. Add validation for RSS
> key size against spec minimum (40 bytes) and driver maximum. When
> validation fails, gracefully disable RSS features and continue
> initialization rather than failing completely.
Hm, FWIW clang says:
drivers/net/virtio_net.c:6841:31: warning: result of comparison of constant 256 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
6841 | } else if (vi->rss_key_size > VIRTIO_NET_RSS_MAX_KEY_SIZE) {
| ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Which is kinda annoying because the value was increased in net-next.
If Machael wants this backported then we need to keep the check
and follow up in net-next? We could try to cast the u32 away but
that feels dirty..
Powered by blists - more mailing lists