1 // SPDX-License-Identifier: GPL-2.0 2 #include <linux/bpf.h> 3 #include <bpf/bpf_helpers.h> 4 5 extern int bpf_test_modorder_retx(void) __ksym; 6 extern int bpf_test_modorder_rety(void) __ksym; 7 8 SEC("classifier") 9 int 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 19 SEC("classifier") 20 int 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 30 char _license[] SEC("license") = "GPL"; 31
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.