selftests/bpf: Fix non-strict SEC() program sections
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 3 Nov 2021 22:08:41 +0000 (15:08 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 7 Nov 2021 16:34:23 +0000 (08:34 -0800)
Fix few more SEC() definitions that were previously missed.

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/20211103220845.2676888-9-andrii@kernel.org
tools/testing/selftests/bpf/progs/test_l4lb.c
tools/testing/selftests/bpf/progs/test_l4lb_noinline.c
tools/testing/selftests/bpf/progs/test_map_lock.c
tools/testing/selftests/bpf/progs/test_queue_stack_map.h
tools/testing/selftests/bpf/progs/test_skb_ctx.c
tools/testing/selftests/bpf/progs/test_spin_lock.c
tools/testing/selftests/bpf/progs/test_tcp_estats.c

index 04fee08..c26057e 100644 (file)
@@ -448,7 +448,7 @@ static __always_inline int process_packet(void *data, __u64 off, void *data_end,
        return bpf_redirect(ifindex, 0);
 }
 
-SEC("l4lb-demo")
+SEC("tc")
 int balancer_ingress(struct __sk_buff *ctx)
 {
        void *data_end = (void *)(long)ctx->data_end;
index b9e2753..19e4d20 100644 (file)
@@ -447,7 +447,7 @@ static __noinline int process_packet(void *data, __u64 off, void *data_end,
        return bpf_redirect(ifindex, 0);
 }
 
-SEC("l4lb-demo")
+SEC("tc")
 int balancer_ingress(struct __sk_buff *ctx)
 {
        void *data_end = (void *)(long)ctx->data_end;
index b5c07ae..acf073d 100644 (file)
@@ -30,7 +30,7 @@ struct {
        __type(value, struct array_elem);
 } array_map SEC(".maps");
 
-SEC("map_lock_demo")
+SEC("cgroup/skb")
 int bpf_map_lock_test(struct __sk_buff *skb)
 {
        struct hmap_elem zero = {}, *val;
index 0fcd3ff..648e8ca 100644 (file)
@@ -24,7 +24,7 @@ struct {
        __uint(value_size, sizeof(__u32));
 } map_out SEC(".maps");
 
-SEC("test")
+SEC("tc")
 int _test(struct __sk_buff *skb)
 {
        void *data_end = (void *)(long)skb->data_end;
index 1d61b36..c482110 100644 (file)
@@ -5,7 +5,7 @@
 
 char _license[] SEC("license") = "GPL";
 
-SEC("skb_ctx")
+SEC("tc")
 int process(struct __sk_buff *skb)
 {
        #pragma clang loop unroll(full)
index 0d31a3b..7e88309 100644 (file)
@@ -45,7 +45,7 @@ struct {
 
 #define CREDIT_PER_NS(delta, rate) (((delta) * rate) >> 20)
 
-SEC("spin_lock_demo")
+SEC("tc")
 int bpf_sping_lock_test(struct __sk_buff *skb)
 {
        volatile int credit = 0, max_credit = 100, pkt_len = 64;
index 2c5c602..e2ae049 100644 (file)
@@ -244,7 +244,7 @@ static __always_inline void send_basic_event(struct sock *sk,
        bpf_map_update_elem(&ev_record_map, &key, &ev, BPF_ANY);
 }
 
-SEC("dummy_tracepoint")
+SEC("tp/dummy/tracepoint")
 int _dummy_tracepoint(struct dummy_tracepoint_args *arg)
 {
        if (!arg->sock)