Merge branch 'bpf-allow-xdp_redirect-for-xdp-dev-bound-programs'
authorMartin KaFai Lau <martin.lau@kernel.org>
Thu, 1 May 2025 19:54:07 +0000 (12:54 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 1 May 2025 19:54:07 +0000 (12:54 -0700)
Lorenzo Bianconi says:

====================
bpf: Allow XDP_REDIRECT for XDP dev-bound programs

In the current implementation if the program is dev-bound to a specific
device, it will not be possible to perform XDP_REDIRECT into a DEVMAP or
CPUMAP even if the program is running in the driver NAPI context.
Fix the issue introducing __bpf_prog_map_compatible utility routine in
order to avoid bpf_prog_is_dev_bound() during the XDP program load.
Continue forbidding to attach a dev-bound program to XDP maps.
====================

Link: https://patch.msgid.link/20250428-xdp-prog-bound-fix-v3-0-c9e9ba3300c7@kernel.org
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>

Trivial merge