Commit fbaeb7b0 authored by Mohsin Bashir's avatar Mohsin Bashir Committed by Paolo Abeni
Browse files

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: f2957147 ("eth: fbnic: add support for TTI HW stats")
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarMohsin Bashir <mohsin.bashr@gmail.com>
Reviewed-by: default avatarJoe Damato <jdamato@fastly.com>
Link: https://patch.msgid.link/20250503020145.1868252-1-mohsin.bashr@gmail.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 8f0ae193
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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];