summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>2026-05-08 17:40:51 +0200
committerJakub Kicinski <kuba@kernel.org>2026-05-11 18:01:37 -0700
commit1697837a67fa862e6c3dbe0a3e63770faac8aec0 (patch)
tree06590ab3b14309f38463cb671b128b0f573c84a9
parente1515a1a494bd07c0c777344937651ba47335534 (diff)
selftests: mptcp: join: validate 8x8 subflows
The limits have been recently increased, it is required to validate that having 64 subflows is allowed. Here, both the client and the server have 8 network interfaces. The server has 8 endpoints marked as 'signal' to announce all its v4 addresses. The client also has 8 endpoints, but marked as 'subflow' and 'fullmesh' in order to create 8 subflows to each address announced by the server. This means 63 additional subflows will be created after the initial one. If it is not possible to increase the limits to 64, it means an older kernel version is being used, and the test is skipped. Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260508-net-next-mptcp-pm-inc-limits-v1-6-c84e3fdf9b6a@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rwxr-xr-xtools/testing/selftests/net/mptcp/mptcp_join.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 28da9df797ae..c6bb345d056b 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -513,6 +513,19 @@ reset_with_tcp_filter()
fi
}
+# For kernel supporting limits above 8
+# $1: title ; $2,4: addrs limit ns1,2 ; $3,5: subflows limit ns1,2
+reset_with_high_limits()
+{
+ reset "${1}" || return 1
+
+ if ! pm_nl_set_limits "${ns1}" "${2}" "${3}" 2>/dev/null ||
+ ! pm_nl_set_limits "${ns2}" "${4}" "${5}" 2>/dev/null; then
+ mark_as_skipped "unable to set the limits to ${*:2}"
+ return 1
+ fi
+}
+
# $1: err msg
fail_test()
{
@@ -3670,6 +3683,21 @@ fullmesh_tests()
chk_prio_nr 0 1 1 0
chk_rm_nr 0 1
fi
+
+ # fullmesh in 8x8 to create 63 additional subflows
+ if ifaces_nr=8 reset_with_high_limits "fullmesh 8x8" 64 64 64 64; then
+ # higher chance to lose ADD_ADDR: allow retransmissions
+ ip netns exec $ns1 sysctl -q net.mptcp.add_addr_timeout=1
+ local i
+ for i in $(seq 1 8); do
+ pm_nl_add_endpoint $ns2 10.0.$i.2 flags subflow,fullmesh
+ pm_nl_add_endpoint $ns1 10.0.$i.1 flags signal
+ done
+ speed=slow \
+ run_tests $ns1 $ns2 10.0.1.1
+ chk_join_nr 63 63 63
+ fi
+
}
fastclose_tests()