selftests/bpf: Add MPTCP test base
authorNicolas Rybowski <nicolas.rybowski@tessares.net>
Thu, 19 May 2022 23:30:12 +0000 (16:30 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 20 May 2022 22:33:23 +0000 (15:33 -0700)
commit8039d353217c1d9dae921f131cfe4153bc23e960
treea7632f371c4416fd41d656b24ec0c00080c90c74
parentd3294cb1e06d70a689924792c2acb897eac7d781
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 <geliang.tang@suse.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Nicolas Rybowski <nicolas.rybowski@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Link: https://lore.kernel.org/bpf/20220519233016.105670-4-mathew.j.martineau@linux.intel.com
MAINTAINERS
tools/testing/selftests/bpf/bpf_tcp_helpers.h
tools/testing/selftests/bpf/config
tools/testing/selftests/bpf/network_helpers.c
tools/testing/selftests/bpf/network_helpers.h
tools/testing/selftests/bpf/prog_tests/mptcp.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/mptcp_sock.c [new file with mode: 0644]