[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zg1ROBmnY0jaKvsf@gmail.com>
Date: Wed, 3 Apr 2024 05:53:12 -0700
From: Breno Leitao <leitao@...ian.org>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: hengqi@...ux.alibaba.com, xuanzhuo@...ux.alibaba.com,
Jason Wang <jasowang@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrew Melnychenko <andrew@...nix.com>, rbc@...a.com,
riel@...riel.com, stable@...r.kernel.org, qemu-devel@...gnu.org,
"open list:VIRTIO CORE AND NET DRIVERS" <virtualization@...ts.linux.dev>,
"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net v3] virtio_net: Do not send RSS key if it is not
supported
On Sun, Mar 31, 2024 at 04:20:30PM -0400, Michael S. Tsirkin wrote:
> On Fri, Mar 29, 2024 at 10:16:41AM -0700, Breno Leitao wrote:
> > @@ -3814,13 +3815,24 @@ static int virtnet_set_rxfh(struct net_device *dev,
> > return -EOPNOTSUPP;
> >
> > if (rxfh->indir) {
> > + if (!vi->has_rss)
> > + return -EOPNOTSUPP;
> > +
> > for (i = 0; i < vi->rss_indir_table_size; ++i)
> > vi->ctrl->rss.indirection_table[i] = rxfh->indir[i];
> > + update = true;
> > }
> > - if (rxfh->key)
> > +
> > + if (rxfh->key) {
> > + if (!vi->has_rss && !vi->has_rss_hash_report)
> > + return -EOPNOTSUPP;
>
>
> What's the logic here? Is it || or &&? A comment can't hurt.
If txfh carries a key, then the device needs to has either has_rss or
has_rss_hash_report "features".
These are basically virtio features VIRTIO_NET_F_HASH_REPORT and
VIRTIO_NET_F_RSS that are set at virtio_probe.
I will add the comment and respin the series.
Powered by blists - more mailing lists