Re: [PATCH net-next v3 4/8] net: ethtool: add get_rx_ring_count callback to optimize RX ring queries

From
Jakub Kicinski <kuba@kernel.org>
Date
2025-09-16 16:18:24
Also in
lkml, virtualization
Reply to
Breno Leitao, 2025-09-15
On Mon, 15 Sep 2025 03:47:29 -0700 Breno Leitao wrote:
quoted hunk ↗ jump to hunk
@@ -1217,7 +1237,7 @@ static noinline_for_stack int ethtool_get_rxrings(struct net_device *dev,
 	size_t info_size;
 	int ret;
 
-	if (!ops->get_rxnfc)
+	if (!ops->get_rxnfc && !ops->get_rx_ring_count)
 		return -EOPNOTSUPP;
There's inconsistency in how we check for the ops being present.
Here we check for get_rxnfc and the new callback.
But ethtool_set_rxfh() and ethtool_set_rxfh_indir() are only checking
for get_rxnfc. I suppose we can remove the explicit ops checks and
let ethtool_get_rx_ring_count() return EOPNOTSUPP?
Thread (12 messages) 12 messages, 3 authors, last reply 2025-09-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help