aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_tcpbpf.h
diff options
context:
space:
mode:
authorAndrey Ignatov <rdna@fb.com>2018-07-11 17:33:37 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-07-15 00:08:41 +0200
commit78d8e26d46bc2ed73ab6a0e369a342478fda4ce0 (patch)
treeea6113284a1b646adc567632117e76a14b0f920d /tools/testing/selftests/bpf/test_tcpbpf.h
parentselftests/bpf: Better verification in test_tcpbpf (diff)
downloadlinux-dev-78d8e26d46bc2ed73ab6a0e369a342478fda4ce0.tar.xz
linux-dev-78d8e26d46bc2ed73ab6a0e369a342478fda4ce0.zip
selftests/bpf: Test case for BPF_SOCK_OPS_TCP_LISTEN_CB
Cover new TCP-BPF callback in test_tcpbpf: when listen() is called on socket, set BPF_SOCK_OPS_STATE_CB_FLAG so that BPF_SOCK_OPS_STATE_CB callback can be called on future state transition, and when such a transition happens (TCP_LISTEN -> TCP_CLOSE), track it in the map and verify it in user space later. Signed-off-by: Andrey Ignatov <rdna@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_tcpbpf.h')
-rw-r--r--tools/testing/selftests/bpf/test_tcpbpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_tcpbpf.h b/tools/testing/selftests/bpf/test_tcpbpf.h
index 2fe43289943c..7bcfa6207005 100644
--- a/tools/testing/selftests/bpf/test_tcpbpf.h
+++ b/tools/testing/selftests/bpf/test_tcpbpf.h
@@ -12,5 +12,6 @@ struct tcpbpf_globals {
__u32 good_cb_test_rv;
__u64 bytes_received;
__u64 bytes_acked;
+ __u32 num_listen;
};
#endif