Commit 2972395d authored by Mohsin Bashir's avatar Mohsin Bashir Committed by Jakub Kicinski
Browse files

eth: fbnic: Fix tx_dropped reporting



Correctly copy the tx_dropped stats from the fbd->hw_stats to the
rtnl_link_stats64 struct.

Fixes: 5f8bd2ce ("eth: fbnic: add support for TMI stats")
Signed-off-by: default avatarMohsin Bashir <mohsin.bashr@gmail.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250802024636.679317-2-mohsin.bashr@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e407fcee
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -422,16 +422,16 @@ static void fbnic_get_stats64(struct net_device *dev,
	tx_packets = stats->packets;
	tx_dropped = stats->dropped;

	stats64->tx_bytes = tx_bytes;
	stats64->tx_packets = tx_packets;
	stats64->tx_dropped = tx_dropped;

	/* 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;

	stats64->tx_bytes = tx_bytes;
	stats64->tx_packets = tx_packets;
	stats64->tx_dropped = tx_dropped;

	for (i = 0; i < fbn->num_tx_queues; i++) {
		struct fbnic_ring *txr = fbn->tx[i];