From: "Michael S. Tsirkin" <mst@redhat.com>
To: Sasha Levin <sashal@kernel.org>
Cc: stable@vger.kernel.org, Srujana Challa <schalla@marvell.com>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH 6.1.y] virtio_net: clamp rss_max_key_size to NETDEV_RSS_KEY_LEN
Date: Wed, 8 Apr 2026 10:33:17 -0400 [thread overview]
Message-ID: <20260408103237-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <adZlDssL48EBKzON@laps>
On Wed, Apr 08, 2026 at 10:24:14AM -0400, Sasha Levin wrote:
> On Wed, Apr 08, 2026 at 10:20:50AM -0400, Michael S. Tsirkin wrote:
> > On Wed, Apr 08, 2026 at 10:15:48AM -0400, Sasha Levin wrote:
> > > On Wed, Apr 08, 2026 at 09:54:33AM -0400, Michael S. Tsirkin wrote:
> > > > On Wed, Apr 08, 2026 at 09:43:51AM -0400, Sasha Levin wrote:
> > > > > From: Srujana Challa <schalla@marvell.com>
> > > > >
> > > > > [ Upstream commit b4e5f04c58a29c499faa85d12952ca9a4faf1cb9 ]
> > > > >
> > > > > rss_max_key_size in the virtio spec is the maximum key size supported by
> > > > > the device, not a mandatory size the driver must use. Also the value 40
> > > > > is a spec minimum, not a spec maximum.
> > > > >
> > > > > The current code rejects RSS and can fail probe when the device reports a
> > > > > larger rss_max_key_size than the driver buffer limit. Instead, clamp the
> > > > > effective key length to min(device rss_max_key_size, NETDEV_RSS_KEY_LEN)
> > > > > and keep RSS enabled.
> > > > >
> > > > > This keeps probe working on devices that advertise larger maximum key sizes
> > > > > while respecting the netdev RSS key buffer size limit.
> > > > >
> > > > > Fixes: 3f7d9c1964fc ("virtio_net: Add hash_key_length check")
> > > > > Cc: stable@vger.kernel.org
> > > > > Signed-off-by: Srujana Challa <schalla@marvell.com>
> > > > > Acked-by: Michael S. Tsirkin <mst@redhat.com>
> > > > > Link: https://patch.msgid.link/20260326142344.1171317-1-schalla@marvell.com
> > > > > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > > > > [ changed clamp target from NETDEV_RSS_KEY_LEN to VIRTIO_NET_RSS_MAX_KEY_SIZE ]
> > > >
> > > > Does this not make the subject and the commit log misleading?
> > >
> > > Probably, but changing the commit subject will just create more confusion.
> > >
> > > --
> > > Thanks,
> > > Sasha
> >
> > It's not just the subject. The commit log says:
> >
> > Also the value 40 is a spec minimum, not a spec maximum.
> >
> > but the changed patch seems to treat it as a maximum:
> >
> > + vi->rss_key_size = min_t(u16, key_sz, VIRTIO_NET_RSS_MAX_KEY_SIZE);
> >
> >
> > so unless I misread the code, the value is never > 40.
>
> I tried to explain it here: https://lore.kernel.org/all/adZitVex9UGVyH-V@laps/
>
> --
> Thanks,
> Sasha
OK let us take the discussion there.
prev parent reply other threads:[~2026-04-08 14:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 6:59 FAILED: patch "[PATCH] virtio_net: clamp rss_max_key_size to NETDEV_RSS_KEY_LEN" failed to apply to 6.1-stable tree gregkh
2026-04-08 13:43 ` [PATCH 6.1.y] virtio_net: clamp rss_max_key_size to NETDEV_RSS_KEY_LEN Sasha Levin
2026-04-08 13:54 ` Michael S. Tsirkin
2026-04-08 14:15 ` Sasha Levin
2026-04-08 14:20 ` Michael S. Tsirkin
2026-04-08 14:24 ` Sasha Levin
2026-04-08 14:33 ` Michael S. Tsirkin [this message]
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=20260408103237-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=kuba@kernel.org \
--cc=sashal@kernel.org \
--cc=schalla@marvell.com \
--cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.