summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLawrence Brakmo <brakmo@fb.com>2017-10-20 11:05:40 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-22 03:12:05 +0100
commitcd86d1fd21025fdd6daf23d1288da405e7ad0ec6 (patch)
treeb3c9cf105f588261cf2d7b03fd3a52a431cb76f9 /tools
parente6546ef6d86d0fc38e0e84ccae80e641f3fc0087 (diff)
downloadlinux-cd86d1fd21025fdd6daf23d1288da405e7ad0ec6.tar.gz
linux-cd86d1fd21025fdd6daf23d1288da405e7ad0ec6.tar.bz2
linux-cd86d1fd21025fdd6daf23d1288da405e7ad0ec6.zip
bpf: Adding helper function bpf_getsockops
Adding support for helper function bpf_getsockops to socket_ops BPF programs. This patch only supports TCP_CONGESTION. Signed-off-by: Vlad Vysotsky <vlad@cs.ucla.edu> Acked-by: Lawrence Brakmo <brakmo@fb.com> Acked-by: Alexei Starovoitov <ast@fb.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/bpf_helpers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h
index e25dbf6038cf..609514f74482 100644
--- a/tools/testing/selftests/bpf/bpf_helpers.h
+++ b/tools/testing/selftests/bpf/bpf_helpers.h
@@ -67,6 +67,9 @@ static int (*bpf_xdp_adjust_meta)(void *ctx, int offset) =
static int (*bpf_setsockopt)(void *ctx, int level, int optname, void *optval,
int optlen) =
(void *) BPF_FUNC_setsockopt;
+static int (*bpf_getsockopt)(void *ctx, int level, int optname, void *optval,
+ int optlen) =
+ (void *) BPF_FUNC_getsockopt;
static int (*bpf_sk_redirect_map)(void *map, int key, int flags) =
(void *) BPF_FUNC_sk_redirect_map;
static int (*bpf_sock_map_update)(void *map, void *key, void *value,