Skip to content

bpf: cpumap: add missing XDP_ABORTED handling in xdp prog runner#11096

Open
kernel-patches-daemon-bpf[bot] wants to merge 1 commit intobpf-next_basefrom
series/1055078=>bpf-next
Open

bpf: cpumap: add missing XDP_ABORTED handling in xdp prog runner#11096
kernel-patches-daemon-bpf[bot] wants to merge 1 commit intobpf-next_basefrom
series/1055078=>bpf-next

Conversation

@kernel-patches-daemon-bpf
Copy link

Pull request for series with
subject: bpf: cpumap: add missing XDP_ABORTED handling in xdp prog runner
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1055078

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 4c51f90
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1055078
version: 3

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 4c51f90
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1055078
version: 3

cpu_map_bpf_prog_run_xdp() handles XDP_PASS, XDP_REDIRECT, and
XDP_DROP but is missing an XDP_ABORTED case. Without it, XDP_ABORTED
falls into the default case which logs a misleading "invalid XDP
action" warning instead of tracing the abort via trace_xdp_exception().

Add the missing XDP_ABORTED case with trace_xdp_exception(), matching
the handling already present in the skb path (cpu_map_bpf_prog_run_skb),
devmap (dev_map_bpf_prog_run), and the generic XDP path (do_xdp_generic).

Also pass xdpf->dev_rx instead of NULL to bpf_warn_invalid_xdp_action()
in the default case, so the warning includes the actual device name.
This aligns with the generic XDP path in net/core/dev.c which already
passes the real device.

Signed-off-by: Anand Kumar Shaw <anandkrshawheritage@gmail.com>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0158268
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1055078
version: 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments