diff mbox series

[net-next] net: fec: add statistics for XDP_TX

Message ID 20230824061150.638251-1-wei.fang@nxp.com (mailing list archive)
State Accepted
Commit 9540329452b737340960b4273600e61a6a236a78
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: fec: add statistics for XDP_TX | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1330 this patch: 1330
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 1353 this patch: 1353
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1353 this patch: 1353
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Wei Fang Aug. 24, 2023, 6:11 a.m. UTC
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>
---
 drivers/net/ethernet/freescale/fec_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Aug. 25, 2023, 9:10 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu, 24 Aug 2023 14:11:50 +0800 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - [net-next] net: fec: add statistics for XDP_TX
    https://git.kernel.org/netdev/net-next/c/9540329452b7

You are awesome, thank you!
diff mbox series

Patch

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;