Skip to content

Commit 9540329

Browse files
Wei Fangdavem330
authored andcommitted
net: fec: add statistics for XDP_TX
The FEC driver supports the statistics for XDP actions except for XDP_TX before, because the XDP_TX was not supported when adding the statistics for XDP. Now the FEC driver has supported XDP_TX since commit f601899 ("net: fec: add XDP_TX feature support"). So it's reasonable and necessary to add statistics for XDP_TX. Signed-off-by: Wei Fang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8e8fc62 commit 9540329

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1590,9 +1590,12 @@ fec_enet_run_xdp(struct fec_enet_private *fep, struct bpf_prog *prog,
15901590
break;
15911591

15921592
case XDP_TX:
1593+
rxq->stats[RX_XDP_TX]++;
15931594
err = fec_enet_xdp_tx_xmit(fep, cpu, xdp, sync);
1594-
if (unlikely(err))
1595+
if (unlikely(err)) {
1596+
rxq->stats[RX_XDP_TX_ERRORS]++;
15951597
goto xdp_err;
1598+
}
15961599

15971600
ret = FEC_ENET_XDP_TX;
15981601
break;

0 commit comments

Comments
 (0)