Re: [PATCH net v3] virtio_net: Do not send RSS key if it is not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux