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>
This commit is contained in:
Matthieu Baerts (NGI0)
2026-05-08 17:40:51 +02:00
committed by Jakub Kicinski
parent e1515a1a49
commit 1697837a67

View File

@@ -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()