Skip to content

Commit e3b47e4

Browse files
geliangtangkuba-moo
authored andcommitted
selftests: mptcp: userspace pm remove initial subflow
This patch adds a selftest for userspace PM to remove the initial subflow. Use userspace_pm_add_sf() to add a subflow, and pass initial IP address to userspace_pm_rm_sf() to remove the initial subflow. Reviewed-by: Matthieu Baerts <[email protected]> Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b3ac570 commit e3b47e4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tools/testing/selftests/net/mptcp/mptcp_join.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3514,6 +3514,30 @@ userspace_tests()
35143514
kill_events_pids
35153515
wait $tests_pid
35163516
fi
3517+
3518+
# userspace pm remove initial subflow
3519+
if reset_with_events "userspace pm remove initial subflow" &&
3520+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3521+
set_userspace_pm $ns2
3522+
pm_nl_set_limits $ns1 0 1
3523+
speed=5 \
3524+
run_tests $ns1 $ns2 10.0.1.1 &
3525+
local tests_pid=$!
3526+
wait_mpj $ns2
3527+
userspace_pm_add_sf $ns2 10.0.3.2 20
3528+
chk_join_nr 1 1 1
3529+
chk_mptcp_info subflows 1 subflows 1
3530+
chk_subflows_total 2 2
3531+
userspace_pm_rm_sf $ns2 10.0.1.2
3532+
# we don't look at the counter linked to the RM_ADDR but
3533+
# to the one linked to the subflows that have been removed
3534+
chk_rm_nr 0 1
3535+
chk_rst_nr 0 0 invert
3536+
chk_mptcp_info subflows 1 subflows 1
3537+
chk_subflows_total 1 1
3538+
kill_events_pids
3539+
wait $tests_pid
3540+
fi
35173541
}
35183542

35193543
endpoint_tests()

0 commit comments

Comments
 (0)