diff options
author | Wei Fang <wei.fang@nxp.com> | 2023-08-24 09:11:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-25 12:08:47 +0300 |
commit | 9540329452b737340960b4273600e61a6a236a78 (patch) | |
tree | d08fea05e3e3839285cfbf33340db053dcb73cd4 /drivers/net/ethernet/freescale/fec_main.c | |
parent | 8e8fc62d7c9dc93844344b587f4e5d12555e2ae6 (diff) | |
download | linux-9540329452b737340960b4273600e61a6a236a78.tar.xz |
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 f601899e4321 ("net: fec: add XDP_TX feature support").
So it's reasonable and necessary to add statistics for XDP_TX.
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec_main.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 8909899e9a31..77c8e9cfb445 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1590,9 +1590,12 @@ fec_enet_run_xdp(struct fec_enet_private *fep, struct bpf_prog *prog, break; case XDP_TX: + rxq->stats[RX_XDP_TX]++; err = fec_enet_xdp_tx_xmit(fep, cpu, xdp, sync); - if (unlikely(err)) + if (unlikely(err)) { + rxq->stats[RX_XDP_TX_ERRORS]++; goto xdp_err; + } ret = FEC_ENET_XDP_TX; break; |