Skip to content

Commit 79144a8

Browse files
committed
Merge branch 'mptcp-fixes-for-recent-issues-reported-by-ci-s'
Matthieu Baerts says: ==================== mptcp: fixes for recent issues reported by CI's This series of 9 patches fixes issues mostly identified by CI's not managed by the MPTCP maintainers. Thank you Linero (LKFT) and Netdev maintainers (NIPA) for running our kunit and selftests tests! For the first patch, it took a bit of time to identify the root cause. Some MPTCP Join selftest subtests have been "flaky", mostly in slow environments. It appears to be due to the use of a TCP-specific helper on an MPTCP socket. A fix for kernels >= v5.15. Patches 2 to 4 add missing kernel config to support NetFilter tables needed for IPTables commands. These kconfigs are usually enabled in default configurations, but apparently not for all architectures. Patches 2 and 3 can be backported up to v5.11 and the 4th one up to v5.19. Patch 5 increases the time limit for MPTCP selftests. It appears that many CI's execute tests in a VM without acceleration supports, e.g. QEmu without KVM. As a result, the tests take longer. Plus, there are more and more tests. This patch modifies the timeout added in v5.18. Patch 6 reduces the maximum rate and delay of the different links in some Simult Flows selftest subtests. The goal is to let slow VMs reach the maximum speed. The original rate was introduced in v5.11. Patch 7 lets CI changing the prefix of the subtests titles, to be able to run the same selftest multiple times with different parameters. With different titles, tests will be considered as different and not override previous results as it is the case with some CI envs. Subtests have been introduced in v6.6. Patch 8 and 9 make some MPTCP Join selftest subtests quicker by stopping the transfer when the expected events have been seen. Patch 8 can be backported up to v6.5. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> ==================== Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
2 parents c15a729 + 04b57c9 commit 79144a8

File tree

6 files changed

+20
-25
lines changed

6 files changed

+20
-25
lines changed

net/mptcp/protocol.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,9 +2314,6 @@ bool __mptcp_retransmit_pending_data(struct sock *sk)
23142314
if (__mptcp_check_fallback(msk))
23152315
return false;
23162316

2317-
if (tcp_rtx_and_write_queues_empty(sk))
2318-
return false;
2319-
23202317
/* the closing socket has some data untransmitted and/or unacked:
23212318
* some data in the mptcp rtx queue has not really xmitted yet.
23222319
* keep it simple and re-inject the whole mptcp level rtx queue

tools/testing/selftests/net/mptcp/config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ CONFIG_NFT_TPROXY=m
2222
CONFIG_NFT_SOCKET=m
2323
CONFIG_IP_ADVANCED_ROUTER=y
2424
CONFIG_IP_MULTIPLE_TABLES=y
25+
CONFIG_IP_NF_FILTER=m
26+
CONFIG_IP_NF_MANGLE=m
2527
CONFIG_IP_NF_TARGET_REJECT=m
2628
CONFIG_IPV6_MULTIPLE_TABLES=y
29+
CONFIG_IP6_NF_FILTER=m
2730
CONFIG_NET_ACT_CSUM=m
2831
CONFIG_NET_ACT_PEDIT=m
2932
CONFIG_NET_CLS_ACT=y

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

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -643,13 +643,6 @@ kill_events_pids()
643643
mptcp_lib_kill_wait $evts_ns2_pid
644644
}
645645

646-
kill_tests_wait()
647-
{
648-
#shellcheck disable=SC2046
649-
kill -SIGUSR1 $(ip netns pids $ns2) $(ip netns pids $ns1)
650-
wait
651-
}
652-
653646
pm_nl_set_limits()
654647
{
655648
local ns=$1
@@ -3453,7 +3446,7 @@ userspace_tests()
34533446
chk_mptcp_info subflows 0 subflows 0
34543447
chk_subflows_total 1 1
34553448
kill_events_pids
3456-
wait $tests_pid
3449+
mptcp_lib_kill_wait $tests_pid
34573450
fi
34583451

34593452
# userspace pm create destroy subflow
@@ -3475,7 +3468,7 @@ userspace_tests()
34753468
chk_mptcp_info subflows 0 subflows 0
34763469
chk_subflows_total 1 1
34773470
kill_events_pids
3478-
wait $tests_pid
3471+
mptcp_lib_kill_wait $tests_pid
34793472
fi
34803473

34813474
# userspace pm create id 0 subflow
@@ -3494,7 +3487,7 @@ userspace_tests()
34943487
chk_mptcp_info subflows 1 subflows 1
34953488
chk_subflows_total 2 2
34963489
kill_events_pids
3497-
wait $tests_pid
3490+
mptcp_lib_kill_wait $tests_pid
34983491
fi
34993492

35003493
# userspace pm remove initial subflow
@@ -3518,7 +3511,7 @@ userspace_tests()
35183511
chk_mptcp_info subflows 1 subflows 1
35193512
chk_subflows_total 1 1
35203513
kill_events_pids
3521-
wait $tests_pid
3514+
mptcp_lib_kill_wait $tests_pid
35223515
fi
35233516

35243517
# userspace pm send RM_ADDR for ID 0
@@ -3544,7 +3537,7 @@ userspace_tests()
35443537
chk_mptcp_info subflows 1 subflows 1
35453538
chk_subflows_total 1 1
35463539
kill_events_pids
3547-
wait $tests_pid
3540+
mptcp_lib_kill_wait $tests_pid
35483541
fi
35493542
}
35503543

@@ -3558,7 +3551,8 @@ endpoint_tests()
35583551
pm_nl_set_limits $ns2 2 2
35593552
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
35603553
speed=slow \
3561-
run_tests $ns1 $ns2 10.0.1.1 2>/dev/null &
3554+
run_tests $ns1 $ns2 10.0.1.1 &
3555+
local tests_pid=$!
35623556

35633557
wait_mpj $ns1
35643558
pm_nl_check_endpoint "creation" \
@@ -3573,7 +3567,7 @@ endpoint_tests()
35733567
pm_nl_add_endpoint $ns2 10.0.2.2 flags signal
35743568
pm_nl_check_endpoint "modif is allowed" \
35753569
$ns2 10.0.2.2 id 1 flags signal
3576-
kill_tests_wait
3570+
mptcp_lib_kill_wait $tests_pid
35773571
fi
35783572

35793573
if reset "delete and re-add" &&
@@ -3582,7 +3576,8 @@ endpoint_tests()
35823576
pm_nl_set_limits $ns2 1 1
35833577
pm_nl_add_endpoint $ns2 10.0.2.2 id 2 dev ns2eth2 flags subflow
35843578
test_linkfail=4 speed=20 \
3585-
run_tests $ns1 $ns2 10.0.1.1 2>/dev/null &
3579+
run_tests $ns1 $ns2 10.0.1.1 &
3580+
local tests_pid=$!
35863581

35873582
wait_mpj $ns2
35883583
chk_subflow_nr "before delete" 2
@@ -3597,7 +3592,7 @@ endpoint_tests()
35973592
wait_mpj $ns2
35983593
chk_subflow_nr "after re-add" 2
35993594
chk_mptcp_info subflows 1 subflows 1
3600-
kill_tests_wait
3595+
mptcp_lib_kill_wait $tests_pid
36013596
fi
36023597
}
36033598

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ readonly KSFT_FAIL=1
66
readonly KSFT_SKIP=4
77

88
# shellcheck disable=SC2155 # declare and assign separately
9-
readonly KSFT_TEST=$(basename "${0}" | sed 's/\.sh$//g')
9+
readonly KSFT_TEST="${MPTCP_LIB_KSFT_TEST:-$(basename "${0}" .sh)}"
1010

1111
MPTCP_LIB_SUBTESTS=()
1212

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
timeout=1200
1+
timeout=1800

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,12 @@ done
284284

285285
setup
286286
run_test 10 10 0 0 "balanced bwidth"
287-
run_test 10 10 1 50 "balanced bwidth with unbalanced delay"
287+
run_test 10 10 1 25 "balanced bwidth with unbalanced delay"
288288

289289
# we still need some additional infrastructure to pass the following test-cases
290-
run_test 30 10 0 0 "unbalanced bwidth"
291-
run_test 30 10 1 50 "unbalanced bwidth with unbalanced delay"
292-
run_test 30 10 50 1 "unbalanced bwidth with opposed, unbalanced delay"
290+
run_test 10 3 0 0 "unbalanced bwidth"
291+
run_test 10 3 1 25 "unbalanced bwidth with unbalanced delay"
292+
run_test 10 3 25 1 "unbalanced bwidth with opposed, unbalanced delay"
293293

294294
mptcp_lib_result_print_all_tap
295295
exit $ret

0 commit comments

Comments
 (0)