diff options
author | Alexei Starovoitov <ast@kernel.org> | 2019-01-31 15:40:08 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-02-01 20:55:39 +0100 |
commit | ab963beb9f5db303b4fd7e34e422b96270e5b972 (patch) | |
tree | f2b57c8f929146cb454a8f2255c54af708286aa7 /tools/testing/selftests/bpf/bpf_helpers.h | |
parent | b4d4556c32667728c9737619580b6ade695027e0 (diff) | |
download | linux-stable-ab963beb9f5db303b4fd7e34e422b96270e5b972.tar.gz linux-stable-ab963beb9f5db303b4fd7e34e422b96270e5b972.tar.bz2 linux-stable-ab963beb9f5db303b4fd7e34e422b96270e5b972.zip |
selftests/bpf: add bpf_spin_lock C test
add bpf_spin_lock C based test that requires latest llvm with BTF support
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_helpers.h')
-rw-r--r-- | tools/testing/selftests/bpf/bpf_helpers.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h index 6c77cf7bedce..6a0ce0f055c5 100644 --- a/tools/testing/selftests/bpf/bpf_helpers.h +++ b/tools/testing/selftests/bpf/bpf_helpers.h @@ -172,6 +172,10 @@ static int (*bpf_skb_vlan_pop)(void *ctx) = (void *) BPF_FUNC_skb_vlan_pop; static int (*bpf_rc_pointer_rel)(void *ctx, int rel_x, int rel_y) = (void *) BPF_FUNC_rc_pointer_rel; +static void (*bpf_spin_lock)(struct bpf_spin_lock *lock) = + (void *) BPF_FUNC_spin_lock; +static void (*bpf_spin_unlock)(struct bpf_spin_lock *lock) = + (void *) BPF_FUNC_spin_unlock; /* llvm builtin functions that eBPF C program may use to * emit BPF_LD_ABS and BPF_LD_IND instructions |