Commit 3d1d6239 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov
Browse files

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



Fix few more SEC() definitions that were previously missed.

Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarDave Marchevsky <davemarchevsky@fb.com>
Link: https://lore.kernel.org/bpf/20211103220845.2676888-9-andrii@kernel.org
parent 5c5edcde
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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)
Loading