mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
f5d8ec838b
commit
23c52b58cc
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user