Linux Audio

Check our new training course

Loading...
Note: File does not exist in v3.15.
 1// SPDX-License-Identifier: GPL-2.0
 2
 3#include <linux/bpf.h>
 4#include <bpf/bpf_helpers.h>
 5#include "bpf_misc.h"
 6
 7__noinline
 8int subprog_tc(struct __sk_buff *skb)
 9{
10	int ret = 1;
11
12	__sink(skb);
13	__sink(ret);
14	/* let verifier know that 'subprog_tc' can change pointers to skb->data */
15	bpf_skb_change_proto(skb, 0, 0);
16	return ret;
17}
18
19SEC("tc")
20int entry_tc(struct __sk_buff *skb)
21{
22	return subprog_tc(skb);
23}
24
25char __license[] SEC("license") = "GPL";