lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <zskbmdjunfamn3x3kmxcjeamnckfh4icb7emwkkwhqwstlzt2e@nqjcg5h6hgsv>
Date: Mon, 15 Sep 2025 02:12:58 -0700
From: Breno Leitao <leitao@...ian.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, 
	"Michael S. Tsirkin" <mst@...hat.com>, Jason Wang <jasowang@...hat.com>, 
	Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Eugenio Pérez <eperezma@...hat.com>, 
	Andrew Lunn <andrew+netdev@...n.ch>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org, 
	virtualization@...ts.linux.dev, Lei Yang <leiyang@...hat.com>, kernel-team@...a.com
Subject: Re: [PATCH net-next v2 4/7] net: ethtool: add get_rx_ring_count
 callback to optimize RX ring queries

On Sun, Sep 14, 2025 at 12:59:49PM -0700, Jakub Kicinski wrote:
> On Fri, 12 Sep 2025 08:59:13 -0700 Breno Leitao wrote:
> > @@ -1225,9 +1242,7 @@ static noinline_for_stack int ethtool_get_rxrings(struct net_device *dev,
> >  	if (ret)
> >  		return ret;
> >  
> > -	ret = ops->get_rxnfc(dev, &info, NULL);
> > -	if (ret < 0)
> > -		return ret;
> > +	info.data = ethtool_get_rx_ring_count(dev);
> 
> Is there a reason we're no longer checking for negative errno here?
> It's possible that none of the drivers actually return an error, but
> we should still check. For consistency with the other patches / paths
> if nothing else.

Agree, we need to check the result of ethtool_get_rx_ring_count, and
return it if negative. I will update the patchset.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ