Commit 79144a81 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

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: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
====================

Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents c15a729c 04b57c9e
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2314,9 +2314,6 @@ bool __mptcp_retransmit_pending_data(struct sock *sk)
	if (__mptcp_check_fallback(msk))
		return false;

	if (tcp_rtx_and_write_queues_empty(sk))
		return false;

	/* the closing socket has some data untransmitted and/or unacked:
	 * some data in the mptcp rtx queue has not really xmitted yet.
	 * keep it simple and re-inject the whole mptcp level rtx queue
+3 −0
Original line number Diff line number Diff line
@@ -22,8 +22,11 @@ CONFIG_NFT_TPROXY=m
CONFIG_NFT_SOCKET=m
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IP6_NF_FILTER=m
CONFIG_NET_ACT_CSUM=m
CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_CLS_ACT=y
+11 −16
Original line number Diff line number Diff line
@@ -643,13 +643,6 @@ kill_events_pids()
	mptcp_lib_kill_wait $evts_ns2_pid
}

kill_tests_wait()
{
	#shellcheck disable=SC2046
	kill -SIGUSR1 $(ip netns pids $ns2) $(ip netns pids $ns1)
	wait
}

pm_nl_set_limits()
{
	local ns=$1
@@ -3453,7 +3446,7 @@ userspace_tests()
		chk_mptcp_info subflows 0 subflows 0
		chk_subflows_total 1 1
		kill_events_pids
		wait $tests_pid
		mptcp_lib_kill_wait $tests_pid
	fi

	# userspace pm create destroy subflow
@@ -3475,7 +3468,7 @@ userspace_tests()
		chk_mptcp_info subflows 0 subflows 0
		chk_subflows_total 1 1
		kill_events_pids
		wait $tests_pid
		mptcp_lib_kill_wait $tests_pid
	fi

	# userspace pm create id 0 subflow
@@ -3494,7 +3487,7 @@ userspace_tests()
		chk_mptcp_info subflows 1 subflows 1
		chk_subflows_total 2 2
		kill_events_pids
		wait $tests_pid
		mptcp_lib_kill_wait $tests_pid
	fi

	# userspace pm remove initial subflow
@@ -3518,7 +3511,7 @@ userspace_tests()
		chk_mptcp_info subflows 1 subflows 1
		chk_subflows_total 1 1
		kill_events_pids
		wait $tests_pid
		mptcp_lib_kill_wait $tests_pid
	fi

	# userspace pm send RM_ADDR for ID 0
@@ -3544,7 +3537,7 @@ userspace_tests()
		chk_mptcp_info subflows 1 subflows 1
		chk_subflows_total 1 1
		kill_events_pids
		wait $tests_pid
		mptcp_lib_kill_wait $tests_pid
	fi
}

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

		wait_mpj $ns1
		pm_nl_check_endpoint "creation" \
@@ -3573,7 +3567,7 @@ endpoint_tests()
		pm_nl_add_endpoint $ns2 10.0.2.2 flags signal
		pm_nl_check_endpoint "modif is allowed" \
			$ns2 10.0.2.2 id 1 flags signal
		kill_tests_wait
		mptcp_lib_kill_wait $tests_pid
	fi

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

		wait_mpj $ns2
		chk_subflow_nr "before delete" 2
@@ -3597,7 +3592,7 @@ endpoint_tests()
		wait_mpj $ns2
		chk_subflow_nr "after re-add" 2
		chk_mptcp_info subflows 1 subflows 1
		kill_tests_wait
		mptcp_lib_kill_wait $tests_pid
	fi
}

+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ readonly KSFT_FAIL=1
readonly KSFT_SKIP=4

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

MPTCP_LIB_SUBTESTS=()

+1 −1
Original line number Diff line number Diff line
timeout=1200
timeout=1800
Loading