Skip to content

Commit 2972395

Browse files
Mohsin Bashirkuba-moo
authored andcommitted
eth: fbnic: Fix tx_dropped reporting
Correctly copy the tx_dropped stats from the fbd->hw_stats to the rtnl_link_stats64 struct. Fixes: 5f8bd2c ("eth: fbnic: add support for TMI stats") Signed-off-by: Mohsin Bashir <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e407fce commit 2972395

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/ethernet/meta/fbnic/fbnic_netdev.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,16 +422,16 @@ static void fbnic_get_stats64(struct net_device *dev,
422422
tx_packets = stats->packets;
423423
tx_dropped = stats->dropped;
424424

425-
stats64->tx_bytes = tx_bytes;
426-
stats64->tx_packets = tx_packets;
427-
stats64->tx_dropped = tx_dropped;
428-
429425
/* Record drops from Tx HW Datapath */
430426
tx_dropped += fbd->hw_stats.tmi.drop.frames.value +
431427
fbd->hw_stats.tti.cm_drop.frames.value +
432428
fbd->hw_stats.tti.frame_drop.frames.value +
433429
fbd->hw_stats.tti.tbi_drop.frames.value;
434430

431+
stats64->tx_bytes = tx_bytes;
432+
stats64->tx_packets = tx_packets;
433+
stats64->tx_dropped = tx_dropped;
434+
435435
for (i = 0; i < fbn->num_tx_queues; i++) {
436436
struct fbnic_ring *txr = fbn->tx[i];
437437

0 commit comments

Comments
 (0)