[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<CH3PR18MB6379E3B3806363B793912AA4A094A@CH3PR18MB6379.namprd18.prod.outlook.com>
Date: Fri, 23 Jan 2026 11:46:48 +0000
From: Srujana Challa <schalla@...vell.com>
To: Jakub Kicinski <kuba@...nel.org>, Willem de Bruijn <willemb@...gle.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"virtualization@...ts.linux.dev" <virtualization@...ts.linux.dev>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"mst@...hat.com" <mst@...hat.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"xuanzhuo@...ux.alibaba.com"
<xuanzhuo@...ux.alibaba.com>,
"eperezma@...hat.com" <eperezma@...hat.com>,
"andrew+netdev@...n.ch" <andrew+netdev@...n.ch>,
"davem@...emloft.net"
<davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
Nithin
Kumar Dabilpuram <ndabilpuram@...vell.com>,
Willem de Bruijn
<willemdebruijn.kernel@...il.com>
Subject: RE: [EXTERNAL] Re: [PATCH net-next] virtio_net: Increase RSS max key
size to match NETDEV_RSS_KEY_LEN
> On Thu, 22 Jan 2026 14:45:27 +0530 Srujana Challa wrote:
> > Increase VIRTIO_NET_RSS_MAX_KEY_SIZE from 40 to 52 bytes to align with
> > the kernel's standard RSS key length defined by NETDEV_RSS_KEY_LEN.
>
> I've been meaning to bump NETDEV_RSS_KEY_LEN to 128 or some such.
> Most modern drivers can't use netdev_rss_key_fill() either because core
> generates a tiny key. And the devices support hashing over two layers of IPv6
> for tunnels.
Instead of hardcoding 52, we can use:
#define VIRTIO_NET_RSS_MAX_KEY_SIZE NETDEV_RSS_KEY_LEN
This automatically stays in sync with NETDEV_RSS_KEY_LEN and will adapt
when it's increased to 128+. Please confirm.
Thanks.
>
> Willem, WDYT? Is there a reason to keep the core key small?
> Or deprecate netdev_rss_key_fill()?
>
> > The virtio specification requires devices to support at least 40 bytes
> > for the RSS key size. However, devices may support larger key sizes up
> > to 52 bytes (as reported by the device's rss_max_key_size config
> > field). This change allows such devices to work properly.
> > Previously, devices reporting rss_max_key_size > 40 would fail with an
> > error during initialization.
> >
> > The driver already handles variable key sizes dynamically through
> > vi->rss_key_size, so increasing the maximum limit is safe and
> > maintains backward compatibility with devices that support smaller key
> > sizes.
>
> > -#define VIRTIO_NET_RSS_MAX_KEY_SIZE 40
> > +#define VIRTIO_NET_RSS_MAX_KEY_SIZE 52
Powered by blists - more mailing lists