From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796508251; b=iBNMmDcK3bf5/XqwH+X4SS2CPW+r7SrDOd9+0yDgVABiwqIOAjn2eQ9v3ECcidvUdAYg AS3tCGK0HRblW0ncUX2J0eizBgWrgUEf+jvmxLuy6mPGfnzOUZHmA1nzEmNwbeMH507Ux UKzKKzJznHbKZqp3E2nI8BjX399ehRkATUSTJDQb33tGOHVOZFc9ByNnv04Vgv0v1+upL 0v4v1GW0+v32PExT3myVwIKXFgcTH94VeTGP5H+wTmqG8rafgjD1+T873d7oM/DyNr2vT c0aSkcLP1rcB6aWK8mJDEwYh8SM8cmJe+sqdLERMawqweLmln5tRKhrvberBEL5wEBw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796508251; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=df9Baza+OHxkZG2Skbaf4kuj2X1LobceAE82AEuTigU=; b=MBv1vLsUePJ5eGKIywhXsbFw+KfPZQfsutqEXNJn3oXxKpbq361U2B+YCj7hpguYzWWI PFl9DKIfdYq978BIFNu2V4bouuSSCxFnv3TRl1bTO7SE0Td6YMnGxJPDozADkkE7eX2U/ yzdyO0HIR7P4r1iwAMqQKnQPFJvkHTqHb2nFwQrom5yoS17iw5GPO83CV33el/QiIkbs/ NE+f896VRMh6rpor/9ACwoS3OX1y5i2yB2IupfwyWq4nlthASQDk/PzD4bdxbupRRCcZ2 HTQoNZinYUfgYmUdMEUzXnxBc5LPpsfKS7fJ2O5W2dmERlfMZYGI6ulOhsEQrZ43fAg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nbzOZZbv; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DCC5606A339; Sat, 5 Dec 2026 22:04:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nbzOZZbv Received: by smtp.kernel.org (Postfix) with ESMTPSA id 062791F00936; Sat, 5 Dec 2026 22:04:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796508250; bh=df9Baza+OHxkZG2Skbaf4kuj2X1LobceAE82AEuTigU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=nbzOZZbv1B6myQ9Zhk0dQpNVq1IKdPrtD4Dwl0IdZp65T/3NxoYkS0wTvM2PgzShw Web3PnQF5QiQKEIoMkKI2fhuFOqC9JTLldFoQNMaVBGrcyttXFilHUMLF1+ammpqv4 3ueX40TGiiMX1kCyhU9zC3Ox0tPMgz/SEH3uHS1TK4kvysXM/frgY1y+5Dq1mfsMm8 pCxZT7t7rOd2G+euNNutKQ75zNyKwzYdTnfXmipH+ramzjj3cAdE/DnzP+q1/v9EPl J3QqYVMzhusfb/3PcewoZoNs9Rdd+SrTnLgqxAOtq0orF1tenN5iKoQR62QtXh/bs/ OvC9YyRmMoaXg== Subject: Re: [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR From: netdev-bot+sashiko@kernel.org To: matttbe@kernel.org Cc: martineau@kernel.org, geliang@kernel.org, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, willemb@google.com, horms@kernel.org, liyonglong@chinatelecom.cn, shuah@kernel.org, fw@strlen.de, netdev@vger.kernel.org, mptcp@lists.linux.dev, linux-kselftest@vger.kernel.org Date: Sat, 05 Dec 2026 22:04:09 +0000 Message-ID: <179650824960.3148.3618583985726885557@kernel.org> In-Reply-To: <20261204-net-next-mptcp-misc-feat-7-5-v1-3-1449de51adae@kernel.org> References: <20261204-net-next-mptcp-misc-feat-7-5-v1-3-1449de51adae@kernel.org> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] This patch defers an RM_ADDR, but no packet is guaranteed to carry it later. -- mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR This patch changes mptcp_pm_remove_addr() so that it only drops a new RM_ADDR when another RM_ADDR is already pending. Before, it dropped the RM_ADDR when any bit of pm.addr_signal was set. A pending ADD_ADDR or echo no longer stops the RM_ADDR from being queued, and the RM_ADDR is expected to go out with a later packet. > diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c > index dacd3cf358f5a..f12a8bfbb2a9a 100644 > --- a/net/mptcp/pm.c > +++ b/net/mptcp/pm.c > @@ -529,7 +529,7 @@ int mptcp_pm_remove_addr(struct mptcp_sock *msk, const struct mptcp_rm_list *rm_ > > pr_debug("msk=%p, rm_list_nr=%d\n", msk, rm_list->nr); > > - if (rm_addr) { > + if (mptcp_pm_should_rm_signal(msk)) { > MPTCP_ADD_STATS(sock_net((struct sock *)msk), > MPTCP_MIB_RMADDRTXDROP, rm_list->nr); > return -EINVAL; [Severity: Medium] The commit message says "the RM_ADDR goes with a later packet". Is a later packet always scheduled for it? When an ADD_ADDR or echo is pending, the RM_ADDR is now queued, and mptcp_pm_remove_addr() sends one pure ACK through mptcp_pm_addr_send_ack_avoid_list(). In mptcp_established_options(), RM_ADDR is only tried if ADD_ADDR is not: net/mptcp/options.c:mptcp_established_options() { ... if (mptcp_established_options_add_addr(sk, skb, &opt_size, remaining, has_ts, opts)) { ... } else if (mptcp_established_options_rm_addr(sk, &opt_size, remaining, opts)) { ... } That ACK therefore carries the ADD_ADDR or echo, and MPTCP_RM_ADDR_SIGNAL stays set. If an MPTCP_PM_ADD_ADDR_SEND_ACK worker run is already queued (the echo case in the commit message), mptcp_pm_worker()->mptcp_pm_addr_send_ack() sends the RM_ADDR later. What happens if the ADD_ADDR is pending and no worker ACK is queued? The ACK sent at announce time by mptcp_pm_create_subflow_or_signal_addr() might not have carried it. That can happen if no subflow was active yet. It can also happen if the pure ACK already carried an MPC ACK, in which case mptcp_established_options_add_addr() skips the ADD_ADDR. In that case nothing seems to schedule another ACK for the RM_ADDR. The only helper that re-arms an ACK checks the ADD_ADDR bit only: net/mptcp/pm.c: static void mptcp_pm_add_addr_send_ack(struct mptcp_sock *msk) { if (!mptcp_pm_should_add_signal(msk)) return; mptcp_pm_schedule_work(msk, MPTCP_PM_ADD_ADDR_SEND_ACK); } ADD_ADDR retransmissions from mptcp_pm_add_addr_timer() set the ADD_ADDR bit again and queue one worker ACK. The ADD_ADDR takes that ACK again. On an idle connection, could the RM_ADDR then stay pending indefinitely? While it is pending, every later call to mptcp_pm_remove_addr() takes the new mptcp_pm_should_rm_signal() branch. It counts RmAddrTxDrop and returns -EINVAL. The callers have already updated their state and ignore the result: mptcp_pm_remove_announced(), the other mptcp_pm_remove_addr() callers in pm_kernel.c and the pm_userspace.c paths. So an RM_ADDR could still be lost indirectly because of an ADD_ADDR. The later patch "mptcp: pm: keep an RM_ADDR when computing the MSS" only makes data packets carry a pending RM_ADDR. It does not add an ACK trigger, so this gap seems to remain at the end of the series. Would it make sense for mptcp_pm_remove_addr() to schedule MPTCP_PM_ADD_ADDR_SEND_ACK directly with mptcp_pm_schedule_work()? It could do so when an ADD_ADDR or echo is pending, or when the RM bit is still set after the single ACK. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204-net-next-mptcp-misc-feat-7-5-v1-0-1449de51adae%40kernel.org