NOTE: This patch depends on my previous "xsk: reuse cleanup" patch, sent to netdev earlier.
The motivation is to have packets which were received on a zero-copy AF_XDP socket, and which returned a TX verdict from the bpf program, queued directly on the TX ring (if they're in the same napi context). When these TX packets are completed, they are placed back onto the reuse queue, as there isn't really any other place to handle them. Space in the reuse queue is preallocated at init time for both the RX and TX rings. Another option would have a smaller TX queue size and count in-flight TX packets, dropping any which exceed the reuseq size - this approach is omitted for simplicity. Jonathan Lemon (3): net: add convert_to_xdp_frame_keep_zc function i40e: Support zero-copy XDP_TX on the RX path for AF_XDP sockets. ixgbe: Support zero-copy XDP_TX on the RX path for AF_XDP sockets. drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 + drivers/net/ethernet/intel/i40e/i40e_xsk.c | 54 ++++++++++++-- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 74 +++++++++++++++++--- include/net/xdp.h | 20 ++++-- 5 files changed, 134 insertions(+), 16 deletions(-) -- 2.17.1