public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Srujana Challa <schalla@marvell.com>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"eperezma@redhat.com" <eperezma@redhat.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Shiva Shankar Kommula <kshankar@marvell.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>
Subject: Re: [EXTERNAL] Re: [PATCH net-next,2/2] virtio_net: replace RSS key size max check with BUILD_BUG_ON
Date: Wed, 25 Feb 2026 07:35:12 -0500	[thread overview]
Message-ID: <20260225073338-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <BY1PR18MB63746E0AE4CEEB32F708F1D5A075A@BY1PR18MB6374.namprd18.prod.outlook.com>

On Wed, Feb 25, 2026 at 12:29:41PM +0000, Srujana Challa wrote:
> > > > patch 1 is unreasonable i think.
> > >
> > > Patch 1 is targeted for net, addressing an issue where
> > > VIRTIO_NET_RSS_MAX_KEY_SIZE is fixed at 40, which is only the minimum
> > > required by the spec. This led to virtio‑net probe failures when
> > > devices reported an RSS key size greater than 40. However, the driver
> > > also cannot handle keys larger than NETDEV_RSS_KEY_LEN (previously 52)
> > > due to the BUG_ON(len > sizeof(netdev_rss_key)) in netdev_rss_key_fill. To
> > resolve both issues, VIRTIO_NET_RSS_MAX_KEY_SIZE has been replaced with
> > NETDEV_RSS_KEY_LEN.
> > 
> > but where would driver *get* keys larger than sizeof(netdev_rss_key), even if
> > device supports more.
> In virtio‑net, we rely on netdev_rss_key_fill() during virtnet_init_default_rss() to populate the RSS hash key,
> which uses device supported length.
> The code path is:
> static void virtnet_init_default_rss(struct virtnet_info *vi)
> {
>         vi->rss_hdr->hash_types = cpu_to_le32(vi->rss_hash_types_supported);
>         vi->rss_hash_types_saved = vi->rss_hash_types_supported;
>         vi->rss_hdr->indirection_table_mask = vi->rss_indir_table_size
>                                                 ? cpu_to_le16(vi->rss_indir_table_size - 1) : 0;
>         vi->rss_hdr->unclassified_queue = 0;
> 
>         virtnet_rss_update_by_qpairs(vi, vi->curr_queue_pairs);
> 
>         vi->rss_trailer.hash_key_length = vi->rss_key_size;
> 
>         netdev_rss_key_fill(vi->rss_hash_key_data, vi->rss_key_size);
> }


Is there a point you are trying to make? disabling features because user
bought a stronger device is counter intuitive. Make it work
in a sane way pls.

-- 
MST


  reply	other threads:[~2026-02-25 12:35 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24  6:58 [PATCH net,v4,1/2] virtio_net: Improve RSS key size validation and use NETDEV_RSS_KEY_LEN Srujana Challa
2026-02-24  6:58 ` [PATCH net-next,2/2] virtio_net: replace RSS key size max check with BUILD_BUG_ON Srujana Challa
2026-02-25  9:11   ` Xuan Zhuo
2026-02-25  9:24     ` Michael S. Tsirkin
2026-02-25  9:30       ` Xuan Zhuo
2026-02-25  9:33         ` Michael S. Tsirkin
2026-02-25  9:36           ` Xuan Zhuo
2026-02-25  9:47             ` Michael S. Tsirkin
2026-02-25  9:52               ` Xuan Zhuo
2026-02-25 10:01                 ` Michael S. Tsirkin
2026-02-25 10:05                 ` Michael S. Tsirkin
2026-02-25 12:13                   ` [EXTERNAL] " Srujana Challa
2026-02-25 12:18                     ` Michael S. Tsirkin
2026-02-25 12:29                       ` Srujana Challa
2026-02-25 12:35                         ` Michael S. Tsirkin [this message]
2026-02-25 14:50   ` David Laight
2026-02-25 14:52     ` Michael S. Tsirkin
2026-02-25 10:03 ` [PATCH net,v4,1/2] virtio_net: Improve RSS key size validation and use NETDEV_RSS_KEY_LEN Michael S. Tsirkin
2026-02-25 12:22   ` [EXTERNAL] " Srujana Challa
2026-02-25 12:24     ` Michael S. Tsirkin
2026-02-25 12:34       ` Srujana Challa
2026-02-25 12:37         ` Michael S. Tsirkin
2026-02-25 12:47           ` Srujana Challa
2026-02-25 12:52             ` Michael S. Tsirkin
2026-02-25 12:56             ` Srujana Challa
2026-02-25 13:21               ` Michael S. Tsirkin
2026-02-25 13:31                 ` Srujana Challa
2026-02-25 13:57                   ` Michael S. Tsirkin
2026-02-26 12:38                     ` 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=20260225073338-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kshankar@marvell.com \
    --cc=kuba@kernel.org \
    --cc=ndabilpuram@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=schalla@marvell.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