Thread (8 messages) flat view 8 messages, 3 authors, 27d ago

Re: [PATCH bpf-next v4 2/3] bpf, xdp: move offload check into dev_xdp_install()

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-08-10 18:50:06
Also in: bpf, linux-kselftest, lkml

On Mon, 10 Aug 2026 13:06:00 +0800 Jiayuan Chen wrote:
bpf_xdp_link_update() calls dev_xdp_install() directly and skips
dev_xdp_attach(), so the checks in dev_xdp_attach() do not run. A user can
make an XDP link with a normal program and then swap in an offloaded or
device-bound program with BPF_LINK_UPDATE, which puts it on the software
path.

Move the three program checks (offloaded, bound to another device, and
device-bound in generic mode) from dev_xdp_attach() into
dev_xdp_install(), so both the attach path and the link update path are
covered.
Shouldn't we move all the checks that are not explicitly about the
netlink API (so all but the first?)

It may be better to split the series and send this patch to net,
the netdev CI has a netdevsim test for the prog offload, would be
good to run that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help