diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-02-03 21:06:17 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-06 21:48:27 +0300 |
commit | a8225efdf31e9498c5696554e5731da893c93f61 (patch) | |
tree | 7f61f0b486c4ca0395caf9cdc614b391f0bc7b35 /drivers/net/ethernet/ti/cpsw_priv.h | |
parent | b91b3a211542bcd69532a8004452d83f499d23cd (diff) | |
download | linux-a8225efdf31e9498c5696554e5731da893c93f61.tar.xz |
net: ethernet: ti: fix netdevice stats for XDP
Align netdevice statistics when the device is running in XDP mode
to other upstream drivers. In particular report to user-space rx
packets even if they are not forwarded to the networking stack
(XDP_PASS) but if they are redirected (XDP_REDIRECT), dropped (XDP_DROP)
or sent back using the same interface (XDP_TX). This patch allows the
system administrator to verify the device is receiving data correctly.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/a457cb17dd9c58c116d64ee34c354b2e89c0ff8f.1612375372.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw_priv.h')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw_priv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw_priv.h b/drivers/net/ethernet/ti/cpsw_priv.h index 7b7f3596b20d..a323bea54faa 100644 --- a/drivers/net/ethernet/ti/cpsw_priv.h +++ b/drivers/net/ethernet/ti/cpsw_priv.h @@ -438,7 +438,7 @@ int cpsw_ndo_bpf(struct net_device *ndev, struct netdev_bpf *bpf); int cpsw_xdp_tx_frame(struct cpsw_priv *priv, struct xdp_frame *xdpf, struct page *page, int port); int cpsw_run_xdp(struct cpsw_priv *priv, int ch, struct xdp_buff *xdp, - struct page *page, int port); + struct page *page, int port, int *len); irqreturn_t cpsw_tx_interrupt(int irq, void *dev_id); irqreturn_t cpsw_rx_interrupt(int irq, void *dev_id); irqreturn_t cpsw_misc_interrupt(int irq, void *dev_id); |