Browse Source

selftests/bpf: Add bpf_get_socket_cookie to bpf_helpers.h

Add missing helper to bpf_helpers.h that is used in tests and samples.

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Andrey Ignatov 7 years ago
parent
commit
0289a2cca0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      tools/testing/selftests/bpf/bpf_helpers.h

+ 2 - 0
tools/testing/selftests/bpf/bpf_helpers.h

@@ -65,6 +65,8 @@ static int (*bpf_xdp_adjust_head)(void *ctx, int offset) =
 	(void *) BPF_FUNC_xdp_adjust_head;
 static int (*bpf_xdp_adjust_meta)(void *ctx, int offset) =
 	(void *) BPF_FUNC_xdp_adjust_meta;
+static int (*bpf_get_socket_cookie)(void *ctx) =
+	(void *) BPF_FUNC_get_socket_cookie;
 static int (*bpf_setsockopt)(void *ctx, int level, int optname, void *optval,
 			     int optlen) =
 	(void *) BPF_FUNC_setsockopt;