Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Link: https://lore.kernel.org/all/CACKFLim7ruspmqvjr6bNRq5Z_XXVk3vVaLZOons7kMCzsEG23A@mail.gmail.com/#t [1]

Signed-off-by: Breno Leitao <leitao@debian.org>
Suggested-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20251107-tg3_counts-v1-1-337fe5c8ccb7@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Breno Leitao and committed by
Jakub Kicinski
23c52b58 f5d8ec83

+1 -1
+1 -1
drivers/net/ethernet/broadcom/tg3.c
··· 12729 12729 if (netif_running(tp->dev)) 12730 12730 return tp->rxq_cnt; 12731 12731 12732 - return min(num_online_cpus(), TG3_RSS_MAX_NUM_QS); 12732 + return min_t(u32, netif_get_num_default_rss_queues(), tp->rxq_max); 12733 12733 } 12734 12734 12735 12735 static u32 tg3_get_rxfh_indir_size(struct net_device *dev)