aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/bpf_tcp_helpers.h
diff options
context:
space:
mode:
authorNicolas Rybowski <[email protected]>2022-05-19 23:30:12 +0000
committerAndrii Nakryiko <[email protected]>2022-05-20 22:33:23 +0000
commit8039d353217c1d9dae921f131cfe4153bc23e960 (patch)
treea7632f371c4416fd41d656b24ec0c00080c90c74 /tools/testing/selftests/bpf/bpf_tcp_helpers.h
parentselftests/bpf: Enable CONFIG_IKCONFIG_PROC in config (diff)
downloadkernel-8039d353217c1d9dae921f131cfe4153bc23e960.tar.gz
kernel-8039d353217c1d9dae921f131cfe4153bc23e960.zip
selftests/bpf: Add MPTCP test base
This patch adds a base for MPTCP specific tests. It is currently limited to the is_mptcp field in case of plain TCP connection because there is no easy way to get the subflow sk from a msk in userspace. This implies that we cannot lookup the sk_storage attached to the subflow sk in the sockops program. v4: - add copyright 2022 (Andrii) - use ASSERT_* instead of CHECK_FAIL (Andrii) - drop SEC("version") (Andrii) - use is_mptcp in tcp_sock, instead of bpf_tcp_sock (Martin & Andrii) v5: - Drop connect_to_mptcp_fd (Martin) - Use BPF test skeleton (Andrii) - Use ASSERT_EQ (Andrii) - Drop the 'msg' parameter of verify_sk Co-developed-by: Geliang Tang <[email protected]> Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Nicolas Rybowski <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Matthieu Baerts <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_tcp_helpers.h')
-rw-r--r--tools/testing/selftests/bpf/bpf_tcp_helpers.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_tcp_helpers.h b/tools/testing/selftests/bpf/bpf_tcp_helpers.h
index b1ede6f0b821..22e0c8849a17 100644
--- a/tools/testing/selftests/bpf/bpf_tcp_helpers.h
+++ b/tools/testing/selftests/bpf/bpf_tcp_helpers.h
@@ -81,6 +81,7 @@ struct tcp_sock {
__u32 lsndtime;
__u32 prior_cwnd;
__u64 tcp_mstamp; /* most recent packet received/sent */
+ bool is_mptcp;
} __attribute__((preserve_access_index));
static __always_inline struct inet_connection_sock *inet_csk(const struct sock *sk)