netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v1 0/2] xdp: recycle Page Pool backed skbs built from XDP frames
@ 2023-03-01 16:03 Alexander Lobakin
  2023-03-01 16:03 ` [PATCH bpf-next v1 1/2] " Alexander Lobakin
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Alexander Lobakin @ 2023-03-01 16:03 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau
  Cc: Alexander Lobakin, Maciej Fijalkowski, Larysa Zaremba,
	Toke Høiland-Jørgensen, Song Liu,
	Jesper Dangaard Brouer, Jakub Kicinski, bpf, netdev, linux-kernel

Yeah, I still remember that "Who needs cpumap nowadays" (c), but anyway.

__xdp_build_skb_from_frame() missed the moment when the networking stack
became able to recycle skb pages backed by a Page Pool. This was making
e.g. cpumap redirect even less effective than simple %XDP_PASS. veth was
also affected in some scenarios.
A lot of drivers use skb_mark_for_recycle() already, it's been almost
two years and seems like there are no issues in using it in the generic
code too. {__,}xdp_release_frame() can be then removed as it losts its
last user.
Page Pool becomes then zero-alloc (or almost) in the abovementioned
cases, too. Other memory type models (who needs them at this point)
have no changes.

Some numbers on 1 Xeon Platinum core bombed with 27 Mpps of 64-byte
IPv6 UDP:

Plain %XDP_PASS on baseline, Page Pool driver:

src cpu Rx     drops  dst cpu Rx
  2.1 Mpps       N/A    2.1 Mpps

cpumap redirect (w/o leaving its node) on baseline:

  6.8 Mpps  5.0 Mpps    1.8 Mpps

cpumap redirect with skb PP recycling:

  7.9 Mpps  5.7 Mpps    2.2 Mpps   +22%

Alexander Lobakin (2):
  xdp: recycle Page Pool backed skbs built from XDP frames
  xdp: remove unused {__,}xdp_release_frame()

 include/net/xdp.h | 29 -----------------------------
 net/core/xdp.c    | 19 ++-----------------
 2 files changed, 2 insertions(+), 46 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2023-03-09 16:39 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-01 16:03 [PATCH bpf-next v1 0/2] xdp: recycle Page Pool backed skbs built from XDP frames Alexander Lobakin
2023-03-01 16:03 ` [PATCH bpf-next v1 1/2] " Alexander Lobakin
2023-03-01 19:08   ` kernel test robot
2023-03-01 19:18   ` kernel test robot
2023-03-02  2:30   ` Yunsheng Lin
2023-03-03 10:31     ` Jesper Dangaard Brouer
2023-03-03 11:22     ` Alexander Lobakin
2023-03-03 12:44       ` Yunsheng Lin
2023-03-03 13:26         ` Alexander Lobakin
2023-03-06  1:09           ` Yunsheng Lin
2023-03-06 11:58             ` Alexander Lobakin
2023-03-07  2:50               ` Yunsheng Lin
2023-03-07 18:14                 ` Alexander Lobakin
2023-03-08  6:27                   ` Yunsheng Lin
2023-03-09 16:27                     ` Alexander Lobakin
2023-03-01 16:03 ` [PATCH bpf-next v1 2/2] xdp: remove unused {__,}xdp_release_frame() Alexander Lobakin
2023-03-03 10:39 ` [PATCH bpf-next v1 0/2] xdp: recycle Page Pool backed skbs built from XDP frames Jesper Dangaard Brouer
2023-03-03 11:31   ` Alexander Lobakin

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