summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/tailcall1.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-09-28 19:19:39 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-09-28 23:51:19 +0300
commitc22bdd28257f3532092746b31856932d84ca2e2b (patch)
treef3311c20a34b3f7ca25f739d897eadd8dcf0878a /tools/testing/selftests/bpf/progs/tailcall1.c
parent8fffa0e3451abdd84e4b4e427f7e66040eb24f43 (diff)
downloadlinux-c22bdd28257f3532092746b31856932d84ca2e2b.tar.xz
selftests/bpf: Switch SEC("classifier*") usage to a strict SEC("tc")
Convert all SEC("classifier*") uses to a new and strict SEC("tc") section name. In reference_tracking selftests switch from ambiguous searching by program title (section name) to non-ambiguous searching by name in some selftests, getting closer to completely removing bpf_object__find_program_by_title(). Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210928161946.2512801-4-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/progs/tailcall1.c')
-rw-r--r--tools/testing/selftests/bpf/progs/tailcall1.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/testing/selftests/bpf/progs/tailcall1.c b/tools/testing/selftests/bpf/progs/tailcall1.c
index 7115bcefbe8a..8159a0b4a69a 100644
--- a/tools/testing/selftests/bpf/progs/tailcall1.c
+++ b/tools/testing/selftests/bpf/progs/tailcall1.c
@@ -11,8 +11,8 @@ struct {
} jmp_table SEC(".maps");
#define TAIL_FUNC(x) \
- SEC("classifier/" #x) \
- int bpf_func_##x(struct __sk_buff *skb) \
+ SEC("tc") \
+ int classifier_##x(struct __sk_buff *skb) \
{ \
return x; \
}
@@ -20,7 +20,7 @@ TAIL_FUNC(0)
TAIL_FUNC(1)
TAIL_FUNC(2)
-SEC("classifier")
+SEC("tc")
int entry(struct __sk_buff *skb)
{
/* Multiple locations to make sure we patch
@@ -45,4 +45,3 @@ int entry(struct __sk_buff *skb)
}
char __license[] SEC("license") = "GPL";
-int _version SEC("version") = 1;