netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3 bpf-next] intel: AF_XDP support for TX of RX packets
@ 2019-06-28 22:15 Jonathan Lemon
  2019-06-28 22:15 ` [PATCH 1/3 bpf-next] net: add convert_to_xdp_frame_keep_zc function Jonathan Lemon
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jonathan Lemon @ 2019-06-28 22:15 UTC (permalink / raw)
  To: netdev, bjorn.topel, magnus.karlsson, jakub.kicinski, jeffrey.t.kirsher
  Cc: kernel-team

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-07-02 16:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-28 22:15 [PATCH 0/3 bpf-next] intel: AF_XDP support for TX of RX packets Jonathan Lemon
2019-06-28 22:15 ` [PATCH 1/3 bpf-next] net: add convert_to_xdp_frame_keep_zc function Jonathan Lemon
2019-07-01 11:02   ` Magnus Karlsson
2019-06-28 22:15 ` [PATCH 2/3 bpf-next] i40e: Support zero-copy XDP_TX on the RX path for AF_XDP sockets Jonathan Lemon
2019-07-01 11:04   ` Magnus Karlsson
2019-07-02 16:44     ` Jonathan Lemon
2019-07-02  7:07   ` Maxim Mikityanskiy
2019-07-02 16:31     ` Jonathan Lemon
2019-06-28 22:15 ` [PATCH 3/3 bpf-next] ixgbe: " Jonathan Lemon
2019-07-01 11:01 ` [PATCH 0/3 bpf-next] intel: AF_XDP support for TX of RX packets Magnus Karlsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).