Re: [PATCH net-next] virtio_net: Increase RSS max key size to match NETDEV_RSS_KEY_LEN
From: Eric Dumazet <edumazet@google.com>
Date: 2026-01-22 16:14:13
Also in:
virtualization
On Thu, Jan 22, 2026 at 4:52 PM Jakub Kicinski [off-list ref] wrote:
On Thu, 22 Jan 2026 14:45:27 +0530 Srujana Challa wrote:quoted
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.
Seems fine to me. Back in 2014, RSS was limited to 52 bytes on all known NIC.
Willem, WDYT? Is there a reason to keep the core key small? Or deprecate netdev_rss_key_fill()?
What do you mean by deprecating it ? One of the ideas was to make sure multiple NIC would share the same key, for some bonding setups. commit 960fb622f85180f36d3aff82af53e2be3db2f888 net: provide a per host RSS key generic infrastructure
quoted
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.quoted
-#define VIRTIO_NET_RSS_MAX_KEY_SIZE 40 +#define VIRTIO_NET_RSS_MAX_KEY_SIZE 52