From patchwork Thu Nov 16 00:31:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mat Martineau X-Patchwork-Id: 13457427 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37C1A4433; Thu, 16 Nov 2023 00:31:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ku9tf0tW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94711C433CA; Thu, 16 Nov 2023 00:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700094711; bh=bfJE6HiF3+FAp9zrybQcVB6vSbN1zDCfxLnLX/6Ihz0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ku9tf0tWlafbUe5MXjdGPYgg8oFAXD0gVWAYAVKGmU+tYexAMLKCFzLQje9wG0I6Z c25r7ZTM2usLv3RntUSS+7GfZEfzqLWCojEmUfuOC9M80smQ9iH96B3SHyBGoGrYr3 UYf0gd5p3FSE8okTPMfnArb0BVV77wNp/yrb9DRr8TzHmg9W/cy/aMP/zrYgnkjYcJ 9mUrXHkXbsF75sJyttMTwKgLZM3ZMEnAu7W6h8COqad0fd4PLrS64UWlgmT0LU26yJ pDAkILyycCG+gW69jn2TrEOsc4KmewoIxxERoVk3pDh4VTq/09K0qHWBj9Yd8Ds1AY 4f6qoXaV9e/Uw== From: Mat Martineau Date: Wed, 15 Nov 2023 16:31:33 -0800 Subject: [PATCH net-next v3 05/15] selftests: mptcp: userspace pm create id 0 subflow Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231115-send-net-next-2023107-v3-5-1ef58145a882@kernel.org> References: <20231115-send-net-next-2023107-v3-0-1ef58145a882@kernel.org> In-Reply-To: <20231115-send-net-next-2023107-v3-0-1ef58145a882@kernel.org> To: Matthieu Baerts , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, Mat Martineau , Geliang Tang X-Mailer: b4 0.12.4 From: Geliang Tang This patch adds a selftest to create id 0 subflow. Pass id 0 to the helper userspace_pm_add_sf() to create id 0 subflow. chk_mptcp_info shows one subflow but chk_subflows_total shows two subflows in each namespace. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 494aee8574fb..6c2c47ce11ad 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3494,6 +3494,25 @@ userspace_tests() kill_events_pids wait $tests_pid fi + + # userspace pm create id 0 subflow + if reset_with_events "userspace pm create id 0 subflow" && + continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then + set_userspace_pm $ns2 + pm_nl_set_limits $ns1 0 1 + speed=5 \ + run_tests $ns1 $ns2 10.0.1.1 & + local tests_pid=$! + wait_mpj $ns2 + chk_mptcp_info subflows 0 subflows 0 + chk_subflows_total 1 1 + userspace_pm_add_sf $ns2 10.0.3.2 0 + chk_join_nr 1 1 1 + chk_mptcp_info subflows 1 subflows 1 + chk_subflows_total 2 2 + kill_events_pids + wait $tests_pid + fi } endpoint_tests()