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.

Reply via email to