]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: Add mptcp subflow subtest
authorGeliang Tang <tanggeliang@kylinos.cn>
Thu, 26 Sep 2024 17:30:24 +0000 (19:30 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Tue, 1 Oct 2024 00:59:31 +0000 (17:59 -0700)
commit9b85f11efa02f3dc78c60961c0b9cff166516464
treecd551f17f188a896c59e85c6ea0ebc2db3552f48
parentcd19b885106e0a24c28ef72fccc4c020782e6e7e
selftests/bpf: Add mptcp subflow subtest

This patch adds a subtest named test_subflow in test_mptcp to load and
verify the newly added MPTCP subflow BPF program. To goal is to make
sure it is possible to set different socket options per subflows, while
the userspace socket interface only lets the application to set the same
socket options for the whole MPTCP connection and its multiple subflows.

To check that, a client and a server are started in a dedicated netns,
with veth interfaces to simulate multiple paths. They will exchange data
to allow the creation of an additional subflow.

When the different subflows are being created, the new MPTCP subflow BPF
program will set some socket options: marks and TCP CC. The validation
is done by the same program, when the userspace checks the value of the
modified socket options. On the userspace side, it will see that the
default values are still being used on the MPTCP connection, while the
BPF program will see different options set per subflow of the same MPTCP
connection.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/76
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240926-upstream-bpf-next-20240506-mptcp-subflow-test-v7-3-d26029e15cdd@kernel.org
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/mptcp.c