summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_txrx_common.h
diff options
context:
space:
mode:
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>2022-04-13 17:30:07 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2022-04-15 21:10:41 +0200
commitb8aef650e54982728660919a0cf9cdacb079ef86 (patch)
treeaee59c0883a8722d73ab17e49a4fc3b6f533392e /drivers/net/ethernet/intel/i40e/i40e_txrx_common.h
parent50ae066480738e0d3ce72a90c8c0f4d9de6092e0 (diff)
downloadlinux-b8aef650e54982728660919a0cf9cdacb079ef86.tar.gz
linux-b8aef650e54982728660919a0cf9cdacb079ef86.tar.bz2
linux-b8aef650e54982728660919a0cf9cdacb079ef86.zip
i40e, 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 I40E_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-7-maciej.fijalkowski@intel.com
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_txrx_common.h')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_txrx_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx_common.h b/drivers/net/ethernet/intel/i40e/i40e_txrx_common.h
index 19da3b22160f..8c5118c8baaf 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx_common.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx_common.h
@@ -20,6 +20,7 @@ void i40e_release_rx_desc(struct i40e_ring *rx_ring, u32 val);
#define I40E_XDP_CONSUMED BIT(0)
#define I40E_XDP_TX BIT(1)
#define I40E_XDP_REDIR BIT(2)
+#define I40E_XDP_EXIT BIT(3)
/*
* build_ctob - Builds the Tx descriptor (cmd, offset and type) qword