]> www.infradead.org Git - users/dwmw2/linux.git/commit
libbpf: improve old BPF skeleton handling for map auto-attach
authorAndrii Nakryiko <andrii@kernel.org>
Mon, 8 Jul 2024 20:45:40 +0000 (13:45 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 10 Jul 2024 02:03:36 +0000 (19:03 -0700)
commita459f4bb27f2e2730039c57786b82288742c8c74
treee4a4e77fe98c18d7efda89eabd3de9fd9d8bc962
parent99fb9531886d8ffa0aa9a693089784c7338518a3
libbpf: improve old BPF skeleton handling for map auto-attach

Improve how we handle old BPF skeletons when it comes to BPF map
auto-attachment. Emit one warn-level message per each struct_ops map
that could have been auto-attached, if user provided recent enough BPF
skeleton version. Don't spam log if there are no relevant struct_ops
maps, though.

This should help users realize that they probably need to regenerate BPF
skeleton header with more recent bpftool/libbpf-cargo (or whatever other
means of BPF skeleton generation).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20240708204540.4188946-4-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/libbpf.c