1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2021 Facebook */
3 #include "../bpf_testmod/bpf_testmod_kfunc.h"
5 extern const int bpf_prog_active __ksym;
9 int __noinline f1(struct __sk_buff *skb)
11 struct bpf_sock *sk = skb->sk;
17 sk = bpf_sk_fullsock(sk);
21 active = (int *)bpf_per_cpu_ptr(&bpf_prog_active,
22 bpf_get_smp_processor_id());
26 sk_state_res = bpf_kfunc_call_test3((struct sock *)sk)->__sk_common.skc_state;
28 return (__u32)bpf_kfunc_call_test1((struct sock *)sk, 1, 2, 3, 4);
32 int kfunc_call_test1(struct __sk_buff *skb)
37 char _license[] SEC("license") = "GPL";