xref: /linux/tools/testing/selftests/bpf/progs/freplace_global_func.c (revision 815d8b0425ad1164e45953ac3d56a9f6f63792cc)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/bpf.h>
3 #include <bpf/bpf_helpers.h>
4 
5 __noinline
6 int test_ctx_global_func(struct __sk_buff *skb)
7 {
8 	volatile int retval = 1;
9 	return retval;
10 }
11 
12 SEC("freplace/test_pkt_access")
13 int new_test_pkt_access(struct __sk_buff *skb)
14 {
15 	return test_ctx_global_func(skb);
16 }
17 
18 char _license[] SEC("license") = "GPL";
19