[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250914125949.17ea0ade@kernel.org>
Date: Sun, 14 Sep 2025 12:59:49 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Breno Leitao <leitao@...ian.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 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.
> return ethtool_rxnfc_copy_to_user(useraddr, &info, info_size, NULL);
--
pw-bot: cr
Powered by blists - more mailing lists