Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Fix non-strict SEC() program sections

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

authored by

Andrii Nakryiko and committed by
Alexei Starovoitov
3d1d6239 5c5edcde

+7 -7
+1 -1
tools/testing/selftests/bpf/progs/test_l4lb.c
··· 448 448 return bpf_redirect(ifindex, 0); 449 449 } 450 450 451 - SEC("l4lb-demo") 451 + SEC("tc") 452 452 int balancer_ingress(struct __sk_buff *ctx) 453 453 { 454 454 void *data_end = (void *)(long)ctx->data_end;
+1 -1
tools/testing/selftests/bpf/progs/test_l4lb_noinline.c
··· 447 447 return bpf_redirect(ifindex, 0); 448 448 } 449 449 450 - SEC("l4lb-demo") 450 + SEC("tc") 451 451 int balancer_ingress(struct __sk_buff *ctx) 452 452 { 453 453 void *data_end = (void *)(long)ctx->data_end;
+1 -1
tools/testing/selftests/bpf/progs/test_map_lock.c
··· 30 30 __type(value, struct array_elem); 31 31 } array_map SEC(".maps"); 32 32 33 - SEC("map_lock_demo") 33 + SEC("cgroup/skb") 34 34 int bpf_map_lock_test(struct __sk_buff *skb) 35 35 { 36 36 struct hmap_elem zero = {}, *val;
+1 -1
tools/testing/selftests/bpf/progs/test_queue_stack_map.h
··· 24 24 __uint(value_size, sizeof(__u32)); 25 25 } map_out SEC(".maps"); 26 26 27 - SEC("test") 27 + SEC("tc") 28 28 int _test(struct __sk_buff *skb) 29 29 { 30 30 void *data_end = (void *)(long)skb->data_end;
+1 -1
tools/testing/selftests/bpf/progs/test_skb_ctx.c
··· 5 5 6 6 char _license[] SEC("license") = "GPL"; 7 7 8 - SEC("skb_ctx") 8 + SEC("tc") 9 9 int process(struct __sk_buff *skb) 10 10 { 11 11 #pragma clang loop unroll(full)
+1 -1
tools/testing/selftests/bpf/progs/test_spin_lock.c
··· 45 45 46 46 #define CREDIT_PER_NS(delta, rate) (((delta) * rate) >> 20) 47 47 48 - SEC("spin_lock_demo") 48 + SEC("tc") 49 49 int bpf_sping_lock_test(struct __sk_buff *skb) 50 50 { 51 51 volatile int credit = 0, max_credit = 100, pkt_len = 64;
+1 -1
tools/testing/selftests/bpf/progs/test_tcp_estats.c
··· 244 244 bpf_map_update_elem(&ev_record_map, &key, &ev, BPF_ANY); 245 245 } 246 246 247 - SEC("dummy_tracepoint") 247 + SEC("tp/dummy/tracepoint") 248 248 int _dummy_tracepoint(struct dummy_tracepoint_args *arg) 249 249 { 250 250 if (!arg->sock)