Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.15 25 lines 449 B view raw
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";