public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] tg3: Fix num of RX queues being reported by ethtool
@ 2025-11-07 10:36 Breno Leitao
  2025-11-07 17:30 ` Michael Chan
  2025-11-11  1:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Breno Leitao @ 2025-11-07 10:36 UTC (permalink / raw)
  To: Pavan Chebbi, Michael Chan, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel, kernel-team, Breno Leitao, Michael Chan

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>
---
 drivers/net/ethernet/broadcom/tg3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index fa58c3ffceb06..e21f7c6a6de70 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -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,
--  
Breno Leitao <leitao@debian.org>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] tg3: Fix num of RX queues being reported by ethtool
  2025-11-07 10:36 [PATCH net-next] tg3: Fix num of RX queues being reported by ethtool Breno Leitao
@ 2025-11-07 17:30 ` Michael Chan
  2025-11-11  1:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Chan @ 2025-11-07 17:30 UTC (permalink / raw)
  To: Breno Leitao
  Cc: Pavan Chebbi, Michael Chan, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
	kernel-team

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

On Fri, Nov 7, 2025 at 2:37 AM Breno Leitao <leitao@debian.org> 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.
>
> 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>

Thanks.
Reviewed-by: Michael Chan <michael.chan@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5469 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] tg3: Fix num of RX queues being reported by ethtool
  2025-11-07 10:36 [PATCH net-next] tg3: Fix num of RX queues being reported by ethtool Breno Leitao
  2025-11-07 17:30 ` Michael Chan
@ 2025-11-11  1:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-11  1:30 UTC (permalink / raw)
  To: Breno Leitao
  Cc: pavan.chebbi, mchan, andrew+netdev, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, kernel-team, michael.chan

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-11  1:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07 10:36 [PATCH net-next] tg3: Fix num of RX queues being reported by ethtool Breno Leitao
2025-11-07 17:30 ` Michael Chan
2025-11-11  1:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox