Contributors: 4
| Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
| Daniel Borkmann |
122 |
91.73% |
2 |
33.33% |
| Andrii Nakryiko |
5 |
3.76% |
2 |
33.33% |
| Hari Bathini |
5 |
3.76% |
1 |
16.67% |
| Toke Höiland-Jörgensen |
1 |
0.75% |
1 |
16.67% |
| Total |
133 |
|
6 |
|
// SPDX-License-Identifier: GPL-2.0
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
struct {
__uint(type, BPF_MAP_TYPE_PROG_ARRAY);
__uint(max_entries, 2);
__uint(key_size, sizeof(__u32));
__uint(value_size, sizeof(__u32));
} jmp_table SEC(".maps");
int count = 0;
SEC("tc")
int classifier_0(struct __sk_buff *skb)
{
count++;
bpf_tail_call_static(skb, &jmp_table, 0);
return 1;
}
SEC("tc")
int entry(struct __sk_buff *skb)
{
/* prog == NULL case */
bpf_tail_call_static(skb, &jmp_table, 1);
bpf_tail_call_static(skb, &jmp_table, 0);
return 0;
}
char __license[] SEC("license") = "GPL";