1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2023 Isovalent */
3 #include <stdbool.h>
4 #include <linux/bpf.h>
5 #include <bpf/bpf_helpers.h>
6 
7 char LICENSE[] SEC("license") = "GPL";
8 
9 bool seen_tc1;
10 bool seen_tc2;
11 bool seen_tc3;
12 bool seen_tc4;
13 
14 SEC("tc/ingress")
15 int tc1(struct __sk_buff *skb)
16 {
17 	seen_tc1 = true;
18 	return TCX_NEXT;
19 }
20 
21 SEC("tc/egress")
22 int tc2(struct __sk_buff *skb)
23 {
24 	seen_tc2 = true;
25 	return TCX_NEXT;
26 }
27 
28 SEC("tc/egress")
29 int tc3(struct __sk_buff *skb)
30 {
31 	seen_tc3 = true;
32 	return TCX_NEXT;
33 }
34 
35 SEC("tc/egress")
36 int tc4(struct __sk_buff *skb)
37 {
38 	seen_tc4 = true;
39 	return TCX_NEXT;
40 }
41