-
Notifications
You must be signed in to change notification settings - Fork 127
bpf: Allow XDP_REDIRECT for XDP dev-bound programs #8858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bpf-next_base
Are you sure you want to change the base?
Conversation
Upstream branch: 91dbac4 |
a041a61
to
b2666a3
Compare
Upstream branch: 224ee86 |
3a495f6
to
dae70e0
Compare
b2666a3
to
9afa005
Compare
Upstream branch: 8e64c38 |
dae70e0
to
7868d79
Compare
9afa005
to
993c0c1
Compare
Upstream branch: 38d976c |
7868d79
to
a4f8c83
Compare
993c0c1
to
97831b9
Compare
Upstream branch: 358b1c0 |
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 and it is not attached to any map entry. This seems in contrast with the explanation available in bpf_prog_map_compatible routine. Fix the issue introducing __bpf_prog_map_compatible utility routine in order to avoid bpf_prog_is_dev_bound() check running bpf_check_tail_call() at program load time (bpf_prog_select_runtime()). Continue forbidding to attach a dev-bound program to XDP maps (BPF_MAP_TYPE_PROG_ARRAY, BPF_MAP_TYPE_DEVMAP and BPF_MAP_TYPE_CPUMAP). Fixes: 3d76a4d ("bpf: XDP metadata RX kfuncs") Acked-by: Stanislav Fomichev <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]>
…progs Improve xdp_metadata bpf selftest in order to check it is possible for a XDP dev-bound program to perform XDP_REDIRECT into a DEVMAP but it is still not allowed to attach a XDP dev-bound program to a DEVMAP entry. Acked-by: Stanislav Fomichev <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]>
a4f8c83
to
02c0426
Compare
Pull request for series with
subject: bpf: Allow XDP_REDIRECT for XDP dev-bound programs
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=957769