public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Srujana Challa <schalla@marvell.com>
To: <netdev@vger.kernel.org>, <virtualization@lists.linux.dev>
Cc: <pabeni@redhat.com>, <mst@redhat.com>, <jasowang@redhat.com>,
	<xuanzhuo@linux.alibaba.com>, <eperezma@redhat.com>,
	<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>,
	<ndabilpuram@marvell.com>, <schalla@marvell.com>
Subject: [PATCH net-next] virtio_net: Increase RSS max key size to match NETDEV_RSS_KEY_LEN
Date: Thu, 22 Jan 2026 14:45:27 +0530	[thread overview]
Message-ID: <20260122091527.339180-1-schalla@marvell.com> (raw)

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.

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.

Signed-off-by: Srujana Challa <schalla@marvell.com>
---
 drivers/net/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index db88dcaefb20..5f06cbc058d7 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -381,7 +381,7 @@ struct receive_queue {
 	struct xdp_buff **xsk_buffs;
 };
 
-#define VIRTIO_NET_RSS_MAX_KEY_SIZE     40
+#define VIRTIO_NET_RSS_MAX_KEY_SIZE     52
 
 /* Control VQ buffers: protected by the rtnl lock */
 struct control_buf {
-- 
2.25.1


             reply	other threads:[~2026-01-22  9:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-22  9:15 Srujana Challa [this message]
2026-01-22 10:15 ` [PATCH net-next] virtio_net: Increase RSS max key size to match NETDEV_RSS_KEY_LEN Michael S. Tsirkin
2026-01-23 11:37   ` [EXTERNAL] " Srujana Challa
2026-01-22 15:52 ` Jakub Kicinski
2026-01-22 16:13   ` Eric Dumazet
2026-01-22 16:17     ` Eric Dumazet
2026-01-22 16:52     ` Jakub Kicinski
2026-01-22 19:32     ` Willem de Bruijn
2026-01-22 19:42       ` Willem de Bruijn
2026-01-23 11:46   ` [EXTERNAL] " Srujana Challa

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=20260122091527.339180-1-schalla@marvell.com \
    --to=schalla@marvell.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kuba@kernel.org \
    --cc=mst@redhat.com \
    --cc=ndabilpuram@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.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