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

From: Jakub Kicinski

Date: Tue Aug 11 2026 - 20:11:48 EST


On Tue, 11 Aug 2026 11:06:34 +0800 Jiayuan Chen wrote:
> > 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.
>
> Though for now bpf_xdp_link_update() already does:
>
>     if (old_prog->type != new_prog->type ||
>         old_prog->expected_attach_type != new_prog->expected_attach_type) {
>         err = -EINVAL;
>         goto out_unlock;
>     }
>
> so the other checks can't be triggered on the update path even without
> them in dev_xdp_install().
>
> So I'm thinking this patch works as a standalone fix (good for
> backport), and the cleanup goes as a followup (if necessary)?

Just do it right please. Feels like we are promised a follow up to
every single patch these days :/