[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251107102853.1082118-2-dtatulea@nvidia.com>
Date: Fri, 7 Nov 2025 12:28:43 +0200
From: Dragos Tatulea <dtatulea@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>, Jesper Dangaard Brouer
<hawk@...nel.org>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Simon Horman
<horms@...nel.org>, Shuah Khan <shuah@...nel.org>, Andrew Lunn
<andrew+netdev@...n.ch>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
<daniel@...earbox.net>, John Fastabend <john.fastabend@...il.com>, "Andrii
Nakryiko" <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>,
"Eduard Zingerman" <eddyz87@...il.com>, Song Liu <song@...nel.org>, Yonghong
Song <yonghong.song@...ux.dev>, KP Singh <kpsingh@...nel.org>, Stanislav
Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, Jiri Olsa
<jolsa@...nel.org>
CC: Dragos Tatulea <dtatulea@...dia.com>, Tariq Toukan <tariqt@...dia.com>,
<netdev@...r.kernel.org>, <linux-kselftest@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <bpf@...r.kernel.org>
Subject: [RFC 0/2] xdp: Delegate fast path return decision to page_pool
This small series proposes the removal of the
BPF_RI_F_RF_NO_DIRECT XDP flag in favour of page_pool's
internal page_pool_napi_local() check which can override
a non-direct recycle into a direct one if the right
conditions are met.,
This was discussed on the mailing list on several occasions
[1][2].
The first patch adds additional benchmarking code to the page_pool
benchmark.
The second patch has the actual change with a proper explanation
and measurements. It remains to be debated if the whole
BPF_RI_F_RF_NO_DIRECT mechanism should be deleted or only
its use in xdp_return_frame_rx_napi().
There is still the unresolved issue of drivers that don't support
page_pool NAPI recycling. This series could be extended to add
that support. Otherwise those drivers would end up with slow
path recycling for XDP.
[1] https://lore.kernel.org/all/8d165026-1477-46cb-94d4-a01e1da40833@kernel.org/
[2] https://lore.kernel.org/all/20250918084823.372000-1-dtatulea@nvidia.com/
Dragos Tatulea (2):
page_pool: add benchmarking for napi-based recycling
xdp: Delegate fast path return decision to page_pool
drivers/net/veth.c | 2 -
include/linux/filter.h | 22 -----
include/net/xdp.h | 2 +-
kernel/bpf/cpumap.c | 2 -
net/bpf/test_run.c | 2 -
net/core/filter.c | 2 +-
net/core/xdp.c | 24 ++---
.../bench/page_pool/bench_page_pool_simple.c | 92 ++++++++++++++++++-
8 files changed, 104 insertions(+), 44 deletions(-)
--
2.50.1
Powered by blists - more mailing lists