1 // SPDX-License-Identifier: GPL-2.0
4 #include <bpf/bpf_tracing.h>
5 #include <bpf/bpf_helpers.h>
7 #include "../test_kmods/bpf_testmod_kfunc.h"
9 char _license[] SEC("license") = "GPL";
11 SEC("tp_btf/tcp_probe")
13 int BPF_PROG(test_nested_acquire_nonzero, struct sock *sk, struct sk_buff *skb)
17 ptr = bpf_kfunc_nested_acquire_nonzero_offset_test(&sk->sk_write_queue);
19 bpf_kfunc_nested_release_test(ptr);
23 SEC("tp_btf/tcp_probe")
25 int BPF_PROG(test_nested_acquire_zero, struct sock *sk, struct sk_buff *skb)
29 ptr = bpf_kfunc_nested_acquire_zero_offset_test(&sk->__sk_common);
31 bpf_kfunc_nested_release_test(ptr);