Skip to contentSkip to conversation

eth: fbnic: fix `tx_dropped` counting

PATCH Applied Mohsin Bashir 3 participants 3 messages May 3, 2025 – May 6, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eth: fbnic: fix `tx_dropped` counting

Fix the tracking of rtnl_link_stats.tx_dropped. The counter tmi.drop.frames is being double counted whereas, the counter tti.cm_drop.frames is being skipped.

Fixes f2957147ae7a ("eth: fbnic: add support for TTI HW stats")
---
 drivers/net/ethernet/meta/fbnic/fbnic_netdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/meta/fbnic/fbnic_netdev.c +2 -2
index d699f58dda21..f994cbf1857d 100644
@@ -425,9 +425,9 @@ static void fbnic_get_stats64(struct net_device *dev,
 
 	/* Record drops from Tx HW Datapath */
 	tx_dropped += fbd->hw_stats.tmi.drop.frames.value +
+		      fbd->hw_stats.tti.cm_drop.frames.value +
 		      fbd->hw_stats.tti.frame_drop.frames.value +
-		      fbd->hw_stats.tti.tbi_drop.frames.value +
-		      fbd->hw_stats.tmi.drop.frames.value;
+		      fbd->hw_stats.tti.tbi_drop.frames.value;
 
 	for (i = 0; i < fbn->num_tx_queues; i++) {
 		struct fbnic_ring *txr = fbn->tx[i];
Signature · 1 line
2.47.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Mohsin Bashir

Fix the tracking of rtnl_link_stats.tx_dropped. The counter tmi.drop.frames is being double counted whereas, the counter tti.cm_drop.frames is being skipped.

Fixes f2957147ae7a ("eth: fbnic: add support for TTI HW stats")
---
 drivers/net/ethernet/meta/fbnic/fbnic_netdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
#2 lore raw
In reply to Mohsin Bashir
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 9 lines · On Fri, 2 May 2025 19:01:45 -0700 you wrote:

Fix the tracking of rtnl_link_stats.tx_dropped. The counter tmi.drop.frames is being double counted whereas, the counter tti.cm_drop.frames is being skipped.

Fixes f2957147ae7a ("eth: fbnic: add support for TTI HW stats")

[...]

Here is the summary with links:
- [net-next] eth: fbnic: fix tx_dropped counting
https://git.kernel.org/netdev/net-next/c/fbaeb7b0f0ff

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html