netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] eth: fbnic: fix `tx_dropped` counting
@ 2025-05-03  2:01 Mohsin Bashir
  2025-05-03  2:58 ` Joe Damato
  2025-05-06  9:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Mohsin Bashir @ 2025-05-03  2:01 UTC (permalink / raw)
  To: netdev
  Cc: alexanderduyck, kuba, andrew+netdev, davem, edumazet, pabeni,
	mohsin.bashr, horms, vadim.fedorenko, sdf

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")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
---
 drivers/net/ethernet/meta/fbnic/fbnic_netdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
index d699f58dda21..f994cbf1857d 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
@@ -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];
-- 
2.47.1


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

end of thread, other threads:[~2025-05-06  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-03  2:01 [PATCH net-next] eth: fbnic: fix `tx_dropped` counting Mohsin Bashir
2025-05-03  2:58 ` Joe Damato
2025-05-06  9:10 ` 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;
as well as URLs for NNTP newsgroup(s).