linux_dsm_epyc7002/drivers/net/ethernet/intel
Magnus Karlsson 4a9b32f30f ixgbe: fix potential RX buffer starvation for AF_XDP
When the RX rings are created they are also populated with buffers so
that packets can be received. Usually these are kernel buffers, but
for AF_XDP in zero-copy mode, these are user-space buffers and in this
case the application might not have sent down any buffers to the
driver at this point. And if no buffers are allocated at ring creation
time, no packets can be received and no interrupts will be generated so
the NAPI poll function that allocates buffers to the rings will never
get executed.

To rectify this, we kick the NAPI context of any queue with an
attached AF_XDP zero-copy socket in two places in the code. Once after
an XDP program has loaded and once after the umem is registered.  This
take care of both cases: XDP program gets loaded first then AF_XDP
socket is created, and the reverse, AF_XDP socket is created first,
then XDP program is loaded.

Fixes: d0bcacd0a1 ("ixgbe: add AF_XDP zero-copy Rx support")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2019-02-21 11:02:47 -08:00
..
e1000 cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
e1000e cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
fm10k ethernet/intel: consolidate NAPI and NAPI exit 2018-11-21 10:35:23 -08:00
i40e i40e: fix potential RX buffer starvation for AF_XDP 2019-02-21 10:56:17 -08:00
iavf ethernet/intel: consolidate NAPI and NAPI exit 2018-11-21 10:35:23 -08:00
ice ice: Do not enable NAPI on q_vectors that have no rings 2018-12-20 12:10:24 -08:00
igb Revert "igb: reduce CPU0 latency when updating statistics" 2019-01-15 13:33:44 -08:00
igbvf ethernet/intel: consolidate NAPI and NAPI exit 2018-11-21 10:35:23 -08:00
igc igc: Remove obsolete IGC_ERR define 2018-11-21 10:55:06 -08:00
ixgb cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
ixgbe ixgbe: fix potential RX buffer starvation for AF_XDP 2019-02-21 11:02:47 -08:00
ixgbevf xfrm: prefer secpath_set over secpath_dup 2018-12-19 11:21:38 -08:00
e100.c e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait 2018-12-20 11:54:27 -08:00
Kconfig ixgbe: fix Kconfig when driver is not a module 2019-01-04 14:02:16 -08:00
Makefile igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support 2018-10-17 12:14:54 -07:00