aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/bpf_helpers.h
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2018-04-28 22:28:12 -0700
committerAlexei Starovoitov <ast@kernel.org>2018-04-29 08:45:53 -0700
commitde2ff05f48afcde816ff4edb217417f62f624ab5 (patch)
treed67117e42ddcdc0da2e91ea8949bc489f0553cef /tools/testing/selftests/bpf/bpf_helpers.h
parentbpf/verifier: improve register value range tracking with ARSH (diff)
downloadlinux-dev-de2ff05f48afcde816ff4edb217417f62f624ab5.tar.xz
linux-dev-de2ff05f48afcde816ff4edb217417f62f624ab5.zip
tools/bpf: add bpf_get_stack helper to tools headers
The tools header file bpf.h is synced with kernel uapi bpf.h. The new helper is also added to bpf_helpers.h. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_helpers.h')
-rw-r--r--tools/testing/selftests/bpf/bpf_helpers.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h
index 69d7b918e66a..265f8e0e8ada 100644
--- a/tools/testing/selftests/bpf/bpf_helpers.h
+++ b/tools/testing/selftests/bpf/bpf_helpers.h
@@ -101,6 +101,8 @@ static int (*bpf_xdp_adjust_tail)(void *ctx, int offset) =
static int (*bpf_skb_get_xfrm_state)(void *ctx, int index, void *state,
int size, int flags) =
(void *) BPF_FUNC_skb_get_xfrm_state;
+static int (*bpf_get_stack)(void *ctx, void *buf, int size, int flags) =
+ (void *) BPF_FUNC_get_stack;
/* llvm builtin functions that eBPF C program may use to
* emit BPF_LD_ABS and BPF_LD_IND instructions