Skip to content

Commit 23c52b5

Browse files
leitaokuba-moo
authored andcommitted
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 <[email protected]> Suggested-by: Michael Chan <[email protected]> Reviewed-by: Michael Chan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f5d8ec8 commit 23c52b5

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12729,7 +12729,7 @@ static u32 tg3_get_rx_ring_count(struct net_device *dev)
1272912729
if (netif_running(tp->dev))
1273012730
return tp->rxq_cnt;
1273112731

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);
1273312733
}
1273412734

1273512735
static u32 tg3_get_rxfh_indir_size(struct net_device *dev)

0 commit comments

Comments
 (0)