Skip to content

Commit e93681a

Browse files
matttbekuba-moo
authored andcommitted
selftests: mptcp: join: cannot rm sf if closed
Thanks to the previous commit, the MPTCP subflows are now closed on both directions even when only the MPTCP path-manager of one peer asks for their closure. In the two tests modified here -- "userspace pm add & remove address" and "userspace pm create destroy subflow" -- one peer is controlled by the userspace PM, and the other one by the in-kernel PM. When the userspace PM sends a RM_ADDR notification, the in-kernel PM will automatically react by closing all subflows using this address. Now, thanks to the previous commit, the subflows are properly closed on both directions, the userspace PM can then no longer closes the same subflows if they are already closed. Before, it was OK to do that, because the subflows were still half-opened, still OK to send a RM_ADDR. In other words, thanks to the previous commit closing the subflows, an error will be returned to the userspace if it tries to close a subflow that has already been closed. So no need to run this command, which mean that the linked counters will then not be incremented. These tests are then no longer sending both a RM_ADDR, then closing the linked subflow just after. The test with the userspace PM on the server side is now removing one subflow linked to one address, then sending a RM_ADDR for another address. The test with the userspace PM on the client side is now only removing the subflow that was previously created. Fixes: 4369c19 ("selftests: mptcp: test userspace pm out of transfer") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20240826-net-mptcp-close-extra-sf-fin-v1-2-905199fe1172@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent f09b0ad commit e93681a

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3429,14 +3429,12 @@ userspace_tests()
34293429
"signal"
34303430
userspace_pm_chk_get_addr "${ns1}" "10" "id 10 flags signal 10.0.2.1"
34313431
userspace_pm_chk_get_addr "${ns1}" "20" "id 20 flags signal 10.0.3.1"
3432-
userspace_pm_rm_addr $ns1 10
34333432
userspace_pm_rm_sf $ns1 "::ffff:10.0.2.1" $MPTCP_LIB_EVENT_SUB_ESTABLISHED
34343433
userspace_pm_chk_dump_addr "${ns1}" \
3435-
"id 20 flags signal 10.0.3.1" "after rm_addr 10"
3434+
"id 20 flags signal 10.0.3.1" "after rm_sf 10"
34363435
userspace_pm_rm_addr $ns1 20
3437-
userspace_pm_rm_sf $ns1 10.0.3.1 $MPTCP_LIB_EVENT_SUB_ESTABLISHED
34383436
userspace_pm_chk_dump_addr "${ns1}" "" "after rm_addr 20"
3439-
chk_rm_nr 2 2 invert
3437+
chk_rm_nr 1 1 invert
34403438
chk_mptcp_info subflows 0 subflows 0
34413439
chk_subflows_total 1 1
34423440
kill_events_pids
@@ -3460,12 +3458,11 @@ userspace_tests()
34603458
"id 20 flags subflow 10.0.3.2" \
34613459
"subflow"
34623460
userspace_pm_chk_get_addr "${ns2}" "20" "id 20 flags subflow 10.0.3.2"
3463-
userspace_pm_rm_addr $ns2 20
34643461
userspace_pm_rm_sf $ns2 10.0.3.2 $MPTCP_LIB_EVENT_SUB_ESTABLISHED
34653462
userspace_pm_chk_dump_addr "${ns2}" \
34663463
"" \
3467-
"after rm_addr 20"
3468-
chk_rm_nr 1 1
3464+
"after rm_sf 20"
3465+
chk_rm_nr 0 1
34693466
chk_mptcp_info subflows 0 subflows 0
34703467
chk_subflows_total 1 1
34713468
kill_events_pids

0 commit comments

Comments
 (0)