Debian Codegraph @

examples/tcx/tcx.c

raw symbols SCIP
1 //go:build ignore
2
3 #include "common.h"
4
5 char __license[] SEC("license") = "Dual MIT/GPL";
6
7 __u64 ingress_pkt_count = 0;
8 __u64 egress_pkt_count = 0;
9
10 SEC("tc")
11 int ingress_prog_func(struct __sk_buff *skb) {
12 __sync_fetch_and_add(&ingress_pkt_count, 1);
13 return TC_ACT_OK;
14 }
15
16 SEC("tc")
17 int egress_prog_func(struct __sk_buff *skb) {
18 __sync_fetch_and_add(&egress_pkt_count, 1);
19 return TC_ACT_OK;
20 }