Loading...
Note: File does not exist in v6.8.
1// SPDX-License-Identifier: GPL-2.0
2#include <linux/bpf.h>
3#include <bpf/bpf_helpers.h>
4
5extern int bpf_test_modorder_retx(void) __ksym;
6extern int bpf_test_modorder_rety(void) __ksym;
7
8SEC("classifier")
9int call_kfunc_xy(struct __sk_buff *skb)
10{
11 int ret1, ret2;
12
13 ret1 = bpf_test_modorder_retx();
14 ret2 = bpf_test_modorder_rety();
15
16 return ret1 == 'x' && ret2 == 'y' ? 0 : -1;
17}
18
19SEC("classifier")
20int call_kfunc_yx(struct __sk_buff *skb)
21{
22 int ret1, ret2;
23
24 ret1 = bpf_test_modorder_rety();
25 ret2 = bpf_test_modorder_retx();
26
27 return ret1 == 'y' && ret2 == 'x' ? 0 : -1;
28}
29
30char _license[] SEC("license") = "GPL";