Skip to content

Commit 432a2cb

Browse files
Wei Fangkuba-moo
authored andcommitted
net: enetc: correct the xdp_tx statistics
The 'xdp_tx' is used to count the number of XDP_TX frames sent, not the number of Tx BDs. Fixes: 7ed2bc8 ("net: enetc: add support for XDP_TX") Cc: [email protected] Signed-off-by: Wei Fang <[email protected]> Reviewed-by: Ioana Ciornei <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent da29199 commit 432a2cb

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/freescale/enetc

1 file changed

+1
-1
lines changed

drivers/net/ethernet/freescale/enetc/enetc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1917,7 +1917,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring,
19171917
enetc_xdp_drop(rx_ring, orig_i, i);
19181918
tx_ring->stats.xdp_tx_drops++;
19191919
} else {
1920-
tx_ring->stats.xdp_tx += xdp_tx_bd_cnt;
1920+
tx_ring->stats.xdp_tx++;
19211921
rx_ring->xdp.xdp_tx_in_flight += xdp_tx_bd_cnt;
19221922
xdp_tx_frm_cnt++;
19231923
/* The XDP_TX enqueue was successful, so we

0 commit comments

Comments
 (0)