1 // SPDX-License-Identifier: GPL-2.0 1 // SPDX-License-Identifier: GPL-2.0 2 2 3 #include <linux/bpf.h> 3 #include <linux/bpf.h> 4 #include <bpf/bpf_helpers.h> 4 #include <bpf/bpf_helpers.h> 5 #include "bpf_misc.h" 5 #include "bpf_misc.h" 6 6 7 __noinline 7 __noinline 8 int subprog(struct __sk_buff *skb) 8 int subprog(struct __sk_buff *skb) 9 { 9 { 10 int ret = 1; 10 int ret = 1; 11 11 12 __sink(ret); 12 __sink(ret); 13 return ret; 13 return ret; 14 } 14 } 15 15 16 SEC("tc") 16 SEC("tc") 17 int entry_tc(struct __sk_buff *skb) 17 int entry_tc(struct __sk_buff *skb) 18 { 18 { 19 return subprog(skb); 19 return subprog(skb); 20 } 20 } 21 21 22 char __license[] SEC("license") = "GPL"; 22 char __license[] SEC("license") = "GPL"; 23 23
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.