bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] AF_XDP clean up/perf improvements
@ 2021-01-22 10:53 Björn Töpel
  2021-01-22 10:53 ` [PATCH bpf-next 1/3] xsk: remove explicit_free parameter from __xsk_rcv() Björn Töpel
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Björn Töpel @ 2021-01-22 10:53 UTC (permalink / raw)
  To: ast, daniel, netdev, bpf
  Cc: Björn Töpel, bjorn.topel, magnus.karlsson,
	maciej.fijalkowski, kuba, jonathan.lemon, maximmi, davem, hawk,
	john.fastabend, ciara.loftus, weqaar.a.janjua, andrii

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/20210119155013.154808-1-bjorn.topel@gmail.com/

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
-- 
2.27.0


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

end of thread, other threads:[~2021-01-26  8:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 10:53 [PATCH bpf-next 0/3] AF_XDP clean up/perf improvements Björn Töpel
2021-01-22 10:53 ` [PATCH bpf-next 1/3] xsk: remove explicit_free parameter from __xsk_rcv() Björn Töpel
2021-01-22 10:53 ` [PATCH bpf-next 2/3] xsk: fold xp_assign_dev and __xp_assign_dev Björn Töpel
2021-01-22 10:53 ` [PATCH bpf-next 3/3] libbpf, xsk: select AF_XDP BPF program based on kernel version Björn Töpel
2021-01-25 23:12   ` Daniel Borkmann
2021-01-26  8:38   ` Jesper Dangaard Brouer
2021-01-22 13:19 ` [PATCH bpf-next 0/3] AF_XDP clean up/perf improvements Toke Høiland-Jørgensen
2021-01-22 13:37   ` Björn Töpel
2021-01-22 13:40     ` Toke Høiland-Jørgensen

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).