Skip to content

AF_XDP clean up/perf improvements

Björn Töpel bpf netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xsk: remove explicit_free parameter from __xsk_rcv()net/xdp/xsk.c+31 -160 replies
2/3xsk: fold xp_assign_dev and __xp_assign_devnet/xdp/xsk_buff_pool.c+3 -90 replies
3/3libbpf, xsk: select AF_XDP BPF program based on kernel versiontools/lib/bpf/xsk.c+79 -32 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMaciej Fijalkowski
1/3R-b
2/3R-b
3/3R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf-next 0/3] AF_XDP clean up/perf improvements

This series has some clean up/performance improvements for XDP sockets.

The first two patches are cleanups for the AF_XDP core, and the restructure actually give a little performance boost.

The last patch adds support for selecting AF_XDP BPF program, based on what the running kernel supports.

The patches were earlier part of the bigger "bpf_redirect_xsk()" series [1]. I pulled out the non-controversial parts into this series.

Thanks to Maciej and Magnus for the internal review/comments!

Thanks to Toke, Alexei, and Andrii for the "auto-detection" help; Instead of basing it on kernel version, a run-time test is performed. Note that I did not add the probing support to libbpf.c, where the other probes reside. Instead it's in xsk.c. The reason for that is that AF_XDP will be moved out from libbpf post-1.0, to libxdp.

Thanks,
Björn

[1] https://lore.kernel.org/bpf/[email protected]/

Björn Töpel (3):
xsk: remove explicit_free parameter from __xsk_rcv()
xsk: fold xp_assign_dev and __xp_assign_dev
libbpf, xsk: select AF_XDP BPF program based on kernel version

 net/xdp/xsk.c           | 47 +++++++++++++++--------
 net/xdp/xsk_buff_pool.c | 12 ++----
 tools/lib/bpf/xsk.c     | 82 +++++++++++++++++++++++++++++++++++++++--
 3 files changed, 113 insertions(+), 28 deletions(-)

base-commit: 443edcefb8213155c0da22c4a999f4a49858fa39

Signature · 1 line
2.27.0