]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Switch sk_lookup selftests to strict SEC("sk_lookup") use
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 28 Sep 2021 16:19:46 +0000 (09:19 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 28 Sep 2021 20:51:20 +0000 (13:51 -0700)
commit4bfb14079d6faff92e63512ee62ff32b86893879
tree314da3ed262c2dc43d60dfeca2ac47fd430e19cd
parenta38c5491e2eb4cffba7db22c30bd9d6b18931d0d
selftests/bpf: Switch sk_lookup selftests to strict SEC("sk_lookup") use

Update "sk_lookup/" definition to be a stand-alone type specifier,
with backwards-compatible prefix match logic in non-libbpf-1.0 mode.

Currently in selftests all the "sk_lookup/<whatever>" uses just use
<whatever> for duplicated unique name encoding, which is redundant as
BPF program's name (C function name) uniquely and descriptively
identifies the intended use for such BPF programs.

With libbpf's SEC_DEF("sk_lookup") definition updated, switch existing
sk_lookup programs to use "unqualified" SEC("sk_lookup") section names,
with no random text after it.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Dave Marchevsky <davemarchevsky@fb.com>
Link: https://lore.kernel.org/bpf/20210928161946.2512801-11-andrii@kernel.org
tools/lib/bpf/libbpf.c
tools/testing/selftests/bpf/progs/test_sk_lookup.c