aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h
diff options
context:
space:
mode:
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>2022-04-13 17:30:08 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2022-04-15 21:10:45 +0200
commitc7dd09fd46283029a41615b2b7034aea26b22ee0 (patch)
tree30e103787898e807de9af1efb928c686bf2d2787 /drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h
parenti40e, xsk: Terminate Rx side of NAPI when XSK Rx queue gets full (diff)
downloadlinux-dev-c7dd09fd46283029a41615b2b7034aea26b22ee0.tar.xz
linux-dev-c7dd09fd46283029a41615b2b7034aea26b22ee0.zip
ixgbe, xsk: Terminate Rx side of NAPI when XSK Rx queue gets full
When XSK pool uses need_wakeup feature, correlate -ENOBUFS that was returned from xdp_do_redirect() with a XSK Rx queue being full. In such case, terminate the Rx processing that is being done on the current HW Rx ring and let the user space consume descriptors from XSK Rx queue so that there is room that driver can use later on. Introduce new internal return code IXGBE_XDP_EXIT that will indicate case described above. Note that it does not affect Tx processing that is bound to the same NAPI context, nor the other Rx rings. Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220413153015.453864-8-maciej.fijalkowski@intel.com
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h
index bba3feaf3318..f1f69ce67420 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h
@@ -8,6 +8,7 @@
#define IXGBE_XDP_CONSUMED BIT(0)
#define IXGBE_XDP_TX BIT(1)
#define IXGBE_XDP_REDIR BIT(2)
+#define IXGBE_XDP_EXIT BIT(3)
#define IXGBE_TXD_CMD (IXGBE_TXD_CMD_EOP | \
IXGBE_TXD_CMD_RS)