tg3: Fix num of RX queues being reported by ethtool
Subsystems (3)
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
@@ -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]>
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 replacenum_online_cpus()in the past, but tg3 ethtool callbacks didn't get converted. Doing it now.Signed-off-by Breno Leitao <[email protected]>Suggested-by Michael Chan <[email protected]>
Thanks.
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 replacenum_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