Skip to contentSkip to conversation

tg3: Fix num of RX queues being reported by ethtool

PATCH Applied Breno Leitao 3 participants 3 messages Nov 7, 2025 – Nov 11, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tg3: Fix num of RX queues being reported by ethtool

Using num_online_cpus() to report number of queues is actually not correct, as reported by Michael[1].

netif_get_num_default_rss_queues() was used to replace num_online_cpus() in the past, but tg3 ethtool callbacks didn't get converted. Doing it now.

---
 drivers/net/ethernet/broadcom/tg3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/tg3.c +1 -1
index fa58c3ffceb06..e21f7c6a6de70 100644
@@ -12729,7 +12729,7 @@ static u32 tg3_get_rx_ring_count(struct net_device *dev)
 	if (netif_running(tp->dev))
 		return tp->rxq_cnt;
 
-	return min(num_online_cpus(), TG3_RSS_MAX_NUM_QS);
+	return min_t(u32, netif_get_num_default_rss_queues(), tp->rxq_max);
 }
 
 static u32 tg3_get_rxfh_indir_size(struct net_device *dev)

---
base-commit: 6fc33710cd6c55397e606eeb544bdf56ee87aae5
change-id: 20251107-tg3_counts-95822e6df6bc

Best regards,

Signature · 1 line
Breno Leitao <[email protected]>
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Breno Leitao

Using num_online_cpus() to report number of queues is actually not correct, as reported by Michael[1].

Quoted 8 lines

netif_get_num_default_rss_queues() was used to replace num_online_cpus() in the past, but tg3 ethtool callbacks didn't get converted. Doing it now.

Thanks.

#2 lore raw
In reply to Breno Leitao
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 07 Nov 2025 02:36:59 -0800 you wrote:

Using num_online_cpus() to report number of queues is actually not correct, as reported by Michael[1].

netif_get_num_default_rss_queues() was used to replace num_online_cpus() in the past, but tg3 ethtool callbacks didn't get converted. Doing it now.

[...]

Here is the summary with links:
- [net-next] tg3: Fix num of RX queues being reported by ethtool

    https://git.kernel.org/netdev/net-next/c/23c52b58cc38

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html