1 // SPDX-License-Identifier: GPL-2.0
3 #include <bpf/bpf_helpers.h>
6 #define __unused __attribute__((unused))
9 __uint(type, BPF_MAP_TYPE_PROG_ARRAY);
10 __uint(max_entries, 1);
11 __uint(key_size, sizeof(__u32));
12 __uint(value_size, sizeof(__u32));
13 } jmp_table SEC(".maps");
18 int classifier_0(struct __sk_buff *skb __unused)
25 int subprog_tail(struct __sk_buff *skb)
27 /* Don't propagate the constant to the caller */
30 bpf_tail_call_static(skb, &jmp_table, 0);
35 int entry(struct __sk_buff *skb)
37 /* Have data on stack which size is not a multiple of 8 */
38 volatile char arr[1] = {};
42 return subprog_tail(skb);
45 char __license[] SEC("license") = "GPL";