[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250503020145.1868252-1-mohsin.bashr@gmail.com>
Date: Fri, 2 May 2025 19:01:45 -0700
From: Mohsin Bashir <mohsin.bashr@...il.com>
To: netdev@...r.kernel.org
Cc: alexanderduyck@...com,
kuba@...nel.org,
andrew+netdev@...n.ch,
davem@...emloft.net,
edumazet@...gle.com,
pabeni@...hat.com,
mohsin.bashr@...il.com,
horms@...nel.org,
vadim.fedorenko@...ux.dev,
sdf@...ichev.me
Subject: [PATCH net-next] 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")
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Signed-off-by: Mohsin Bashir <mohsin.bashr@...il.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
Powered by blists - more mailing lists