Loading...
Note: File does not exist in v6.9.4.
1// SPDX-License-Identifier: GPL-2.0
2
3#include <vmlinux.h>
4#include <bpf/bpf_tracing.h>
5#include <bpf/bpf_helpers.h>
6#include "bpf_misc.h"
7#include "../bpf_testmod/bpf_testmod_kfunc.h"
8
9char _license[] SEC("license") = "GPL";
10
11SEC("tp_btf/tcp_probe")
12__success
13int BPF_PROG(test_nested_acquire_nonzero, struct sock *sk, struct sk_buff *skb)
14{
15 struct sk_buff *ptr;
16
17 ptr = bpf_kfunc_nested_acquire_nonzero_offset_test(&sk->sk_write_queue);
18
19 bpf_kfunc_nested_release_test(ptr);
20 return 0;
21}
22
23SEC("tp_btf/tcp_probe")
24__success
25int BPF_PROG(test_nested_acquire_zero, struct sock *sk, struct sk_buff *skb)
26{
27 struct sk_buff *ptr;
28
29 ptr = bpf_kfunc_nested_acquire_zero_offset_test(&sk->__sk_common);
30
31 bpf_kfunc_nested_release_test(ptr);
32 return 0;
33}