summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/freplace_global_func.c
blob: 96cb61a6ce87aa048714f64a527d007ad28abafb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: GPL-2.0
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>

__noinline
int test_ctx_global_func(struct __sk_buff *skb)
{
	volatile int retval = 1;
	return retval;
}

SEC("freplace/test_pkt_access")
int new_test_pkt_access(struct __sk_buff *skb)
{
	return test_ctx_global_func(skb);
}

char _license[] SEC("license") = "GPL";