Skip to content

intel: AF_XDP support for TX of RX packets

Jonathan Lemon netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: add convert_to_xdp_frame_keep_zc functioninclude/net/xdp.h+16 -41 reply
2/3i40e: Support zero-copy XDP_TX on the RX path for AF_XDP sockets.drivers/net/ethernet/intel/i40e/i40e_txrx.h drivers/net/ethernet/intel/i40e/i40e_xsk.c+51 -44 replies
3/3ixgbe: Support zero-copy XDP_TX on the RX path for AF_XDP sockets.drivers/net/ethernet/intel/ixgbe/ixgbe.h drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c+67 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3 bpf-next] intel: AF_XDP support for TX of RX packets

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(-)
Signature · 1 line
2.17.1