Re: [PATCH v4 bpf-next 0/9] BPF XDP link
From: Alexei Starovoitov <hidden>
Date: 2020-07-26 03:46:53
Also in:
bpf
On Tue, Jul 21, 2020 at 11:46 PM Andrii Nakryiko [off-list ref] wrote:
Following cgroup and netns examples, implement bpf_link support for XDP. The semantics is described in patch #2. Program and link attachments are mutually exclusive, in the sense that neither link can replace attached program nor program can replace attached link. Link can't replace attached link as well, as is the case for any other bpf_link implementation. Patch #1 refactors existing BPF program-based attachment API and centralizes high-level query/attach decisions in generic kernel code, while drivers are kept simple and are instructed with low-level decisions about attaching and detaching specific bpf_prog. This also makes QUERY command unnecessary, and patch #8 removes support for it from all kernel drivers. If that's a bad idea, we can drop that patch altogether. With refactoring in patch #1, adding bpf_xdp_link is completely transparent to drivers, they are still functioning at the level of "effective" bpf_prog, that should be called in XDP data path. Corresponding libbpf support for BPF XDP link is added in patch #5. v3->v4: - fix a compilation warning in one of drivers (Jakub);
As far as I could review everything looks fine, so I've applied the set. The code is delicate. I wish people were more active doing code reviews. So I encourage folks to still look at it. If there is anything missing I'm sure Andrii will fix it up in the follow up.