From patchwork Wed Jan 31 21:49:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts \(NGI0\)" X-Patchwork-Id: 768683 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 88F7939FCF; Wed, 31 Jan 2024 21:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737831; cv=none; b=ubXU98XliG1DN4ejbjJ1m3fGwx4ji3060+adf8rLctoimwUnVmrmigeAcaLJabTq02mFvSO+IZcxcqP7bGjQX52zBJhm+i6Be7mjirrLCnUXfpPJQVAjJEWcjBtyobpxZ8HwizRFYLLi10Yqbqe0FOERvkTQKpofF6ys+MSGHpU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737831; c=relaxed/simple; bh=XXiWwUEZmp5fjWh5iKtz9h44NEjaTGRyKTaVQI0W7EE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RupbRr1gPsymN+x1i6oJfvOb4kas/vgasBXmSFHx0N7iW+B7pTSdvYohe9oW+zY3PvarBqaeU5Rbet075mssk4DWGfN8t9UnPGJskNIJ/rfCwCvV619WLWBohANXdy4AFU8CNKTqSCjLRwTF3vuxTH87ohDvgwrJTISMltTkd4U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sFgY/iXR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sFgY/iXR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC91AC433C7; Wed, 31 Jan 2024 21:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706737830; bh=XXiWwUEZmp5fjWh5iKtz9h44NEjaTGRyKTaVQI0W7EE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sFgY/iXRgbSOFmpZ6z10TkYjISw4HnH3YbXBZrWixCt1KrGI2Zqt2ocCPELJjgyty IR519rsTjb7bnHkOxHISRDgVjv1j+LvQ+5NLp/k0SApAqdKRyHgaCCX10I1wIZ5bYE HM1G0M0O65QJieNRmnNs8Bz4vV73ZS8xKr5IcMvhK+mHIJNEw2ssO20NJtLFolXgML vVobITLTki5kkwaqUlfOamRNE6JKPFYT4mLuUhQ4GSlABtLcvNSgN0d3v9/UcWKueI 0XIJw3tg6DhhkXvOi7uIe2yzIMP7tOc6smCcdiBj03XRA0Eb3HHX+nH9dCxwfPlksx gmANgXKdTH+Pw== From: "Matthieu Baerts (NGI0)" Date: Wed, 31 Jan 2024 22:49:46 +0100 Subject: [PATCH net 1/9] mptcp: fix data re-injection from stale subflow Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-1-4c1c11e571ff@kernel.org> References: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> In-Reply-To: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1863; i=matttbe@kernel.org; h=from:subject:message-id; bh=9dynpHdX9Ik8LmCQAbnOxMKWOpT+IehcxBDh9DIP2U4=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlusCfymu+KeBVySFiiH6iony4SrKMhe8Ag5Umy F6hj4BkVeyJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZbrAnwAKCRD2t4JPQmmg cxvPD/9FQKFrrd+Cjx/3AcNt3A5KkvBCM8chxULaBnM213+Wgrrxn4cyHELI9dLkhFNmhJxbiEL S8n4NxN2sOaATxTxNQ+rkBGCNsFOx8tPhPWJelhvTZUjmsZ4+vi0L0b78tFmXlkDqM55qTbF+Ca O5qlmSvcPFwdmx419Evx1jF1TqctbR0GlMKu8DKfNhmRobmEJl7kUAOiyC0DiK83ygx3bEFwK8o q8EmBcZlG6EX+zVp/6pY8EkJGm4Ev22xshhLO99koDXgJ1ldsKaGxYV6cSVTYn3g+6oBIME6+tJ NJNYTvhHNn5GL8vN7ppNEUOYdLIcQZL+xovUIMA5vUgrRkUUOBFBjvReQkgcptrPnBhW2IR/mUr +YH2ItVKo1uMk4CXXYXkYH6iQSCfQN3DZRnDX2SGgSy5vrtXVLdbOPQtwmJQCVkwPmTlg0tDY1K f6l5Nldy+OL5dM7B7gSi3P82pM2uoQYmPRYLim20jHRQqo2DykB6SJMcDvVH8+qHUq7OfFRL6AV WiZSw8pWORKgPTxqOEz/EYSAPaxGYtqvFzQpTcnfi1M7CSBOp/nuiXETL2xvqJ9fm5jun2KWxgk e5a96VfxpYjEuz+jDCUB4OsIraP2gRI3b868+nzb4tOC45q5SFvsHWtgMbAlh0NA3yyVBe3BnT0 7O6hRJyfR737+8Q== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Paolo Abeni When the MPTCP PM detects that a subflow is stale, all the packet scheduler must re-inject all the mptcp-level unacked data. To avoid acquiring unneeded locks, it first try to check if any unacked data is present at all in the RTX queue, but such check is currently broken, as it uses TCP-specific helper on an MPTCP socket. Funnily enough fuzzers and static checkers are happy, as the accessed memory still belongs to the mptcp_sock struct, and even from a functional perspective the recovery completed successfully, as the short-cut test always failed. A recent unrelated TCP change - commit d5fed5addb2b ("tcp: reorganize tcp_sock fast path variables") - exposed the issue, as the tcp field reorganization makes the mptcp code always skip the re-inection. Fix the issue dropping the bogus call: we are on a slow path, the early optimization proved once again to be evil. Fixes: 1e1d9d6f119c ("mptcp: handle pending data on closed subflow") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/468 Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- net/mptcp/protocol.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 3ed4709a7509..028e8b473626 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -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 From patchwork Wed Jan 31 21:49:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts \(NGI0\)" X-Patchwork-Id: 768682 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 DD04E3A297; Wed, 31 Jan 2024 21:50:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737837; cv=none; b=uhExG/tCHmGbSs2r8lRP1mZ95thWEJw5LrAwnQa1frmA5l+pfct9ZXgYhYdq2O9RRndr25qZf+hwHO9ISXHgyukIDZfD2aGyuuFVryH46Hsq/juoeT0DVAEx4D0ysSvxHeY0s5gh50cUlpd4NLg7DezMt57LPArKf0eaWiSiSw0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737837; c=relaxed/simple; bh=5I5llBhTBkCmK0s7KWB8ojoj8fai4KIqQBLePXNkM3Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D2rroDKp96kWOjLK7tWCdkLkZ/u3Sb+W2xnnHeS8Yi/hXLuyMnLxJn0LRnm4Oh785Is25CqCzpZGIapv1ltZBHap3c5WAQWqiy/x1mqhTm9F6ykdquLZDhDhtFMoRHksaFGMLRBCliu7bddeYO6lLkoJLMVI6tVE9GaGjODfm/k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VZH/AQB1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VZH/AQB1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 017A3C433C7; Wed, 31 Jan 2024 21:50:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706737836; bh=5I5llBhTBkCmK0s7KWB8ojoj8fai4KIqQBLePXNkM3Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VZH/AQB1HTIqKoAi8L0V1p3SiGvI19V2+zWvLE3ayRxUvLpsKPpZ2iMmb4GnB9oJi NIWXLusim+ivzhAzFyj5A/lJBz3X0i9BncZvPTH3yR7B0A9Yh/+cSodXkzXwlFNSGv VdEbP3Wb/if8ye69tobjLmDUR83zKD1GM/fUhbvC+zLN8T86KNXWWViQT3D+Hr/IwS rN/96gr9QdMyS/XljBpAVutW1L4+3gAccZKec1UtEua+vwdqk7CREiaMoHeeBLNyhB wlO0JYWH+QPnX/uan2avcjYw1bNhE09XdQYLXf453mBfba9JUGaxJDs5VDEB3olO+P WffR/VoQCfKVQ== From: "Matthieu Baerts (NGI0)" Date: Wed, 31 Jan 2024 22:49:48 +0100 Subject: [PATCH net 3/9] selftests: mptcp: add missing kconfig for NF Filter in v6 Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-3-4c1c11e571ff@kernel.org> References: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> In-Reply-To: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , stable@vger.kernel.org, Geliang Tang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1107; i=matttbe@kernel.org; h=from:subject:message-id; bh=5I5llBhTBkCmK0s7KWB8ojoj8fai4KIqQBLePXNkM3Y=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlusCgR8RgTQHbONhBRVmM2S0ggDA/5vmN8cGmt Pyg5HRagK6JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZbrAoAAKCRD2t4JPQmmg c8OdD/9RAu55NsbSe+vJrAYMbKNyV1Nq/mJhjcAPUkT671MytoyenLK9Fs7b8J7vkA3EsyYKYj0 iIaU3axNzUJ4gKZWG9L8/9wGr/9pq6A0vIfuAK1kCTVyPu0XPIeswK0M4oCRZ24e9XdthtbGjVo ZtLU/2DCq4eAW2dEK/or/9R0Wj5QOB/KLl5VcJRozEjDjQuGb881+cZPkc7b1H70sIELtttqo5F 06zsOK4AZyzJCS570/W4tITSpa8FLs/ZPfQMMRlCIVKps3Vn8RT0S/VUQnykrd/+82U7ciIfDA2 HC5uSvtmxG8Mu7iHyL0krvyVZicFoXCzgtmyRsoKtPft/9Ai/Wa0hJe+uWjaUQIpgINuJf/iSLI CTiehkRhEV6uNvJT+hvAU5+h488oBdSWWKKgxpYfxg1igh9uVtXZLz2atYaZyUisYDt1Pwt190O CCmzZ9f1wo4ApqgGLqc8W6aVIuXouX4K/shweEA6Hd4phTgkbnvJlQic+XHaK5HJtSn+fZef4up fB4uYouUzCfTqv+9Z5lweyi8NmpHBorckBUHCaB4uLSleBWciRkHvW8jQAc3w8XbgckbbQCl3Ct NbHXErQipa5tL0Hgm5niibA5gqHMiE7U3mmjt2zm3jKOPgfsW5b6u9/URFKJYGpfFNznyeuUjNi gMRgHQInjz+jhPg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Since the commit mentioned below, 'mptcp_join' selftests is using IPTables to add rules to the Filter table for IPv6. It is then required to have IP6_NF_FILTER KConfig. This KConfig is usually enabled by default in many defconfig, but we recently noticed that some CI were running our selftests without them enabled. Fixes: 523514ed0a99 ("selftests: mptcp: add ADD_ADDR IPv6 test cases") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/config | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/mptcp/config b/tools/testing/selftests/net/mptcp/config index 2a00bf4acdfa..26fe466f803d 100644 --- a/tools/testing/selftests/net/mptcp/config +++ b/tools/testing/selftests/net/mptcp/config @@ -25,6 +25,7 @@ CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_NF_FILTER=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 From patchwork Wed Jan 31 21:49:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts \(NGI0\)" X-Patchwork-Id: 768681 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 1A6FC3B193; Wed, 31 Jan 2024 21:50:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737843; cv=none; b=ukh8eMprLF4or1sfJ3HwQRDIVbnqw5Nw2JQL9UJm0hkHD654Oec29FTqEaJy74lHCdxHu6WrHHoEnsTI0fdwFu4nUZAY7g3XYuOjatcRwpJPQwIVPv9fuuhI3PExQkbeLwgR7RZaWnQH3ZA8jLe/lve81ow36mShlgQPkEFRA2A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737843; c=relaxed/simple; bh=h0+/78PJrDBl/T7h3RlEEe1UbiApGugahjnTY8broM8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Mr3USZkCx0u6afCxnh5ARsTm2NeZmYPJeNu1o29nbSAd7NIm02P1QSEbygUWv+oBOSEDnM9eO0iTFffDdPsWRB0nykbJxI5O7Q3qI86RZlG8coBMu6FzvJmPnWhFeUsXbi3vF99IvoaEqN+cThugRuteHqH0/fV4pTCeYHEWVEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DFYsw9PR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DFYsw9PR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55D73C433F1; Wed, 31 Jan 2024 21:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706737842; bh=h0+/78PJrDBl/T7h3RlEEe1UbiApGugahjnTY8broM8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DFYsw9PR3PokgtOPpA06Y3GmoM0ZxJXN7h/YkzgCJZlQhBkUjEe6v/52rtMQpIf59 6y5re4ay1LsdWNo0gc9ulgHPIFy0uDntlKYw51A2y7XBqp65vTJznf4HldpCg9oZUS jaS24osDUCEJG05yTnqrpRlWZ9+E8eyYmNQKaHWLtQCNAIRezgK0zS2c+d+JaRGaCs sQvmp5Dbcvm/j8esB4uOJ0nVio6YyY9Qbgr5XZMjABYYOvarDVADW0p504KjkUZfzZ VdMU7oeWgKTMu8XwjUsEmWqGdslYUUFggQbMvuH4N6KDRK8rnT+mxDlo4kZ9QCUveU U7gcOfUAj51Wg== From: "Matthieu Baerts (NGI0)" Date: Wed, 31 Jan 2024 22:49:50 +0100 Subject: [PATCH net 5/9] selftests: mptcp: increase timeout to 30 min Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-5-4c1c11e571ff@kernel.org> References: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> In-Reply-To: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1216; i=matttbe@kernel.org; h=from:subject:message-id; bh=h0+/78PJrDBl/T7h3RlEEe1UbiApGugahjnTY8broM8=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlusCgo31rWVxKduKuRkQ1DSI34n9XFxHBCviYU E2fJ3i1BCSJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZbrAoAAKCRD2t4JPQmmg c44CD/4wn12MKWL+J8B5sLIxJZqN7XguyG80hSmJvtu648JX29JCO3/x4mMDF3UXhAFv4Ziys1L t7Yrm9SVS5M4EncXrjcZlMSd3nkgmlfJIF6uEp5WIokQqhU6vBXFIIWn9QnG7G20FP8dNYseFmw +4G0vejI/iEtqpQrdFeYewt7M/i8NEc87BczH/qJTj/qihIx4PFoe1GsHejJplf8Z1YNZUhIyY+ oxrP+y1nlr82F6ejDBeG13Gq9rePk/e8oGZedrAmBHjHKgEVEIPR3IeGDyp15CIRX1YBGFw2XT2 EUJGloVOrLupwyND2J06bi58diNpXr2ML4TwxZV9wM2q2iifpe7ysvy0GQTSt2KCNxUCEGbqNxk yQoWIFHpHovrNxVU6pAtWZAAHa5KhX2i42rK/dmDblZY1bKMaCSx7mm0ma/1huG8wVu2DgLflEP CC0GxAo6H4MtD4faLKHa0CE7iEj4kxmDFsTTEei9yK7EE+eG6APr8n4pL1s+Wp6Tk0609LNPUA8 fCz+rATWuLbpjSDMSKUto8/YodJyuGf6M4Hw+5S4tVSTM5+vMLfeZIPyydvVoiT1pNT9FIVi9zT SpaKyzQB09KNILYQg0lyRtxzW30rV1vSwZKUwml0ih6UUpKnZ7Rxuk1a6aSwV5NeXhg9pXSDRn7 yJkKIdvoZRa3Lxg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 On very slow environments -- e.g. when QEmu is used without KVM --, mptcp_join.sh selftest can take a bit more than 20 minutes. Bump the default timeout by 50% as it seems normal to take that long on some environments. When a debug kernel config is used, this selftest will take even longer, but that's certainly not a common test env to consider for the timeout. The Fixes tag that has been picked here is there simply to help having this patch backported to older stable versions. It is difficult to point to the exact commit that made some env reaching the timeout from time to time. Fixes: d17b968b9876 ("selftests: mptcp: increase timeout to 20 minutes") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/settings b/tools/testing/selftests/net/mptcp/settings index 79b65bdf05db..abc5648b59ab 100644 --- a/tools/testing/selftests/net/mptcp/settings +++ b/tools/testing/selftests/net/mptcp/settings @@ -1 +1 @@ -timeout=1200 +timeout=1800 From patchwork Wed Jan 31 21:49:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts \(NGI0\)" X-Patchwork-Id: 768680 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 735CE3C06B; Wed, 31 Jan 2024 21:50:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737849; cv=none; b=ZTbuH0gqeGjKmW+NdaSFoKphDOMagxQ7u4HuYTXWNY6qIyEiE5W2cGegIARNud01nJQG4E1btyuGyeSDsajQxvVoFKk5mLxpv5anz2axVKfeGHd2GG/GwbyFjOj9R7NNR4ze/u9GTrleOmj+ZQYjWhLqFwriSL2UhEX/VdYiJsA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737849; c=relaxed/simple; bh=3E5/P7Z5DrvNOzf9PuQQ34OuKSGwwV8XI0lmvwYqA1U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=syye0ulMtXEI0Ffhij40PjC7z66letBaCTTCAxb/jQ4iml98A3gu4YVJdvyC4ZQbKa1oW17uTvefolcmE9EdKIyvW0DVn2ii8mJR+/w772rDgJrUmtIcveOIBYft9lqtithkma+GnSj9TwQP4mx6LUNPGu6umaO2PoRDbBUYyDo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Gm+evdqM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Gm+evdqM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 526B8C433F1; Wed, 31 Jan 2024 21:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706737848; bh=3E5/P7Z5DrvNOzf9PuQQ34OuKSGwwV8XI0lmvwYqA1U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Gm+evdqMoXSW09/HxZglSxeyd+zmBrVkCm9crYPm+Xw3wV7DoqyC22sZ4ciyU+Wbz TY+9TwYByRnoQ+wLf9Q1lkWKt0h32ir3OCY3n6pawsJCMNK6vn8PlMxc12s4N137sl X7qx1yqolEP0yUHNiT2bYo0K9gC8IjJso3O5iAilfouNHpESpmyKHXk3AaO3XVF1Sh jBG3WWo5nC4J06dLSUxfTKp0SKYMOJZTlhYcwl3SqnAuEvNZJavkCKsSWl0g8Gg8KZ 3zmg8MGY7qqevCk+YGgAikGKfO07wjf1dpAAiYnMV9xAS8qXs9rY0trJ13Z+BECYpq 5NIUuvud9lmTw== From: "Matthieu Baerts (NGI0)" Date: Wed, 31 Jan 2024 22:49:52 +0100 Subject: [PATCH net 7/9] selftests: mptcp: allow changing subtests prefix Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-7-4c1c11e571ff@kernel.org> References: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> In-Reply-To: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1287; i=matttbe@kernel.org; h=from:subject:message-id; bh=3E5/P7Z5DrvNOzf9PuQQ34OuKSGwwV8XI0lmvwYqA1U=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlusCgVP/RyFJqdfuGCRCnqm7Lf+FC6U1XH1yrJ zwwxFX8ZHaJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZbrAoAAKCRD2t4JPQmmg c2SOD/9Hf8EGy9fMdNRAEz3WHV6h5wtRScF/MbzimcqOMo82x+yjfx89KxHNd63DeJ4lxmnpohT cMV36JMIRnXr2xjs4FBF3blrI4jAWj12Z2bvAAGgfEJy1XFVaTe1gi3iS3+bzGmKXQb0KTNBd9a Rae3lTAsd3zh9TpHa4c3Hk71V3LtRc57JFESeulQ3XoKv9uV3FWR4bhlVXV0BfZjfup0/qD3Fc3 wYqdSR/dSeTxGYBZK5npQpiH39joQAA/xn0TWbHWDSBZjvr7HV6vzmvNm5Z/XSKITUGUpV2GFaY ZSZJjP+/qVeIH/ks08wq164J6wntPEirzl3TPV9alPNE8U+UwYgqlYyphvzffCpJ5w0VB9M+I/8 koAx3YO7Es8uqEU84jDa4pIlIWoKZF4ko6NTj+uMamxTH1ybTK2cTJCD6rdIQ3sNCBJFdxDB3PK CUieisApoLF1b/yvpcm5Eq4WJMLNiFRYWWenHvvki1KRAm82gfq/kysu7534D16Ts6gyfvyRXA8 hrFz7Y79FVFNQqaUbB2koRav7qbseBkEb6GaiZdfOyBnk9No8gU1psHqEiDvQi4FfYIE1UHLWiD oE5lqPFfwT6WKHpBYrlD7gfHzxKzdY3qojP5DXBrolHQdIYz0pPzIZEzwl7FPhgMJ/4jzDZX5mR 2u/nWeaKXbQrT+g== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 If a CI executes the same selftest multiple times with different options, all results from the same subtests will have the same title, which confuse the CI. With the same title printed in TAP, the tests are considered as the same ones. Now, it is possible to override this prefix by using MPTCP_LIB_KSFT_TEST env var, and have a different title. While at it, use 'basename' to remove the suffix as well instead of using an extra 'sed'. Fixes: c4192967e62f ("selftests: mptcp: lib: format subtests results in TAP") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh index 022262a2cfe0..3a2abae5993e 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -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=() From patchwork Wed Jan 31 21:49:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts \(NGI0\)" X-Patchwork-Id: 768679 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 5E21445C14; Wed, 31 Jan 2024 21:50:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737855; cv=none; b=r7rc6AmH3ibMcWPeD6yLPvzAaf91Oah23SLDNHF4rqZOthVFfLo2bmAT1XAp830il3nvXsRumit4WF3NLZjsU11tdmS+dupWYFYMbA0laIHi4IVtRor09CcPHAywcOzxvcESnNMCNF9Jgm9vxMIUZyHv2xdATbVt6Ia6e6/LYXU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737855; c=relaxed/simple; bh=dx7wRnDCqrDJsKtDK7xNZDoVY35TSIKa32jxbefvqs8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rC+MMUVSNmEmmcmB2nTnqp7hY/fNCPtm5mO2ABI3edLAN1N9U1sb7zDrKXp7Fll7R8dNNBTq+5tBxs6Z4UiaBtqPSESlPGh+rl5cbyUhDuFSvfjufBrJp7aHlgeJrF3Jmk0iTXGJfUduTbBgGHJI2VBse5xYLqb/yzS+dzlI8kk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M9daojn3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="M9daojn3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79F93C43142; Wed, 31 Jan 2024 21:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706737855; bh=dx7wRnDCqrDJsKtDK7xNZDoVY35TSIKa32jxbefvqs8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=M9daojn3WbUrsdJtg1dQ9fqgqRcCQUGre2GSemGntl5aSWpQU5Cg6olIjoyK6BM+l 5c165+TnyQslNZaV7+qDdLAmgj2ywWw7UcLy+sOsyOUGY3zq/RUjjP0slIdtkw7VQi G4tf8pcPIuZhWNfxqF+9RVVtJwqZ5W2WZGaqscjp5I+987xwjPXVUbyFD41ysnxGqw P1DPLbzEoleACw1NAMJb4hnbfpszLvuS8PKZJGMPJHHROB3QhrXK7ea6Pgx/9OCfD1 UdSYUNHrsFurJIZtai8xrRNA7TsopgEi7VvakM01qEA73vOd0NLDz8uCuBW374Put2 lacjjKtO7sdqQ== From: "Matthieu Baerts (NGI0)" Date: Wed, 31 Jan 2024 22:49:54 +0100 Subject: [PATCH net 9/9] selftests: mptcp: join: stop transfer when check is done (part 2) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-9-4c1c11e571ff@kernel.org> References: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> In-Reply-To: <20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , stable@vger.kernel.org, Geliang Tang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3349; i=matttbe@kernel.org; h=from:subject:message-id; bh=dx7wRnDCqrDJsKtDK7xNZDoVY35TSIKa32jxbefvqs8=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlusCg8SsXtieygSIwUgQbQ/KEVDAVd9jBEbaTy 8Ttrh5Cuf6JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZbrAoAAKCRD2t4JPQmmg c2qWD/sHFGNL8EnWdDMRDcbajqT+mC1/pA+MR1y08Rcc5IrWGV4a36pl0oPJx5GSSsi7WQVReJc PtpFb/fS3hK2n5yE6dFvLPCIrUUeEpSQqxkmk/NDrDLyqA3E2Wrz038AxVMdL/POsunfqWsLu/E VBH6Wg1SoQ2IgEpU8vnyvgSeybuCIabbIfE1sVYmcKqXVstCTnbrT3CSH7PM3prdPlmxZzMX/r1 X2+9purLs4XA7Bovfk1gE5velSO/fYCQ590la+fE0XKZatDojZRTXK7WfAWAieeDy/Fo/JRh1jX pSq0aOMBBAK4HRJjc5wFERRj+E0BoRLM/ql+sioT2SJTTjbuUonF/44+rG9yk7MpRRcjIN/PDb5 xUYndv/WmkSvUph2Cl+8kp2hShWtMkgCe7FVodmz3+ZkZ6EXZiXLM8WffRT2N0gidXRHTBDx9at gNi6n1En3iqG4edgR9umbcffTADzZimiGZkSboMm1TVDRnMSTZQpRW0pP/jFNrXCRLblpun8wjQ q5LUZaxRYiPFnsZRTjBUD5cBgF0IfjezSEOXzE/gjOUVi4x4isI9GO7sZ5aN/7z/mlvKIqjaH0h Rf7j8BmGWMqEbt2Gsittp6wMXyOc42/W30j8UPS/f/5UY9pH35Ue+ONoOas9Jj4w/5EGb6Ew/8p vzmCCRJFxSng30g== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Since the "Fixes" commits mentioned below, the newly added "userspace pm" subtests of mptcp_join selftests are launching the whole transfer in the background, do the required checks, then wait for the end of transfer. There is no need to wait longer, especially because the checks at the end of the transfer are ignored (which is fine). This saves quite a few seconds on slow environments. While at it, use 'mptcp_lib_kill_wait()' helper everywhere, instead of on a specific one with 'kill_tests_wait()'. Fixes: b2e2248f365a ("selftests: mptcp: userspace pm create id 0 subflow") Fixes: e3b47e460b4b ("selftests: mptcp: userspace pm remove initial subflow") Fixes: b9fb176081fb ("selftests: mptcp: userspace pm send RM_ADDR for ID 0") Cc: stable@vger.kernel.org Reviewed-and-tested-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 85bcc95f4ede..c07386e21e0a 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -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 @@ -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 }