๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #27527

Re: [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR

#27527
From: netdev-bot+sashiko
Date: Sat, 05 Dec 2026 22:04
106 lines
12130 bytes
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
Technical Details
Message-ID: <179650824960.3148.3618583985726885557@kernel.org>
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378154-linux-kernel-netdev=dewy.ru
References: <20261204-net-next-mptcp-misc-feat-7-5-v1-3-1449de51adae@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378154-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because
 of an ADD_ADDR
Date: Sat, 05 Dec 2026 22:04:09 +0000
Organization: Usenet Network
Message-ID: <179650824960.3148.3618583985726885557@kernel.org>
References: <20261204-net-next-mptcp-misc-feat-7-5-v1-3-1449de51adae@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3129665"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:U0y3zWOg6aEf8Ad+kQGCL3H/Oiw= sha256:YwyY0Je9CeFCjSKEmD90pwpFIbXrpz3HbJL8tEUaMMw=
	sha1:LEwmbFWq55/KxPLfnzbC7KZz7FU= sha256:BENCtvahq/649039zQZvYrDQr8DMHdyny3oQ1Wkn2iM=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 732AA117ED8; Sun,  6 Dec 2026 01:04:33 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.639
X-Spam-Status: No, score=-3.639 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id ESFs_JwZLe1G;
	Sun,  6 Dec 2026 01:04:29 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-378154-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id E49C5117ED5; Sun,  6 Dec 2026 01:04:20 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 4A6D428BDE; Sat,  5 Dec 2026 22:04:17 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796508257;
	b=4jI5+3S3wLJEqbybicnBKtdHtw1Vj4XTktdTAu64haPJqABxic8OasT4rM3ldeb5s5c6
	 d2BnIW8hXdzx3FxDscJfK/B7vhKiaPF1kM0Kx67xfxnSmp59CmFb+xTatLRDsoeWyPvBs
	 jQRZ2UuMurKEG7QBDcOmYnwbmz/tGGpvT66khRrfaFSW/RZZ3AEMueHrG/Pxe9qRJI4Xy
	 IfnP5zCEOkbZxZx0C9EXQjzEZ8nNMz1gzLiAVkQlVsfIttOFSmPA4r6k4+WrKIv8kSXd8
	 3sGxJT6FwWNHKozmWQ+WubS3GZa0Q2aw1wZfuQKrEpvjiTiOErC/LU0BfKQ5U/ezQMw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796508257;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=df9Baza+OHxkZG2Skbaf4kuj2X1LobceAE82AEuTigU=;
	b=Ag0H92GcjhzgkChJG4jI9NV8K7WkygH93xMFgX7KxrMk+ZDHwS+0QcOFfS88WEl7GkY1
	 mxJo/zGrpDD3dCqE+SnFoKA9Sw+eSdeypEEdLizu0mfXim/g2Z5IrrgOAFSQye41eZM0C
	 f4pH+zpD21dG8ZuXuM/os6Ce2AzWUBx0n0nFoAaxURe9EN9YpgqIbXBKfXY4hftmXNF1Q
	 wQnbdJLyYG/Zr7+o2lFgwYqDDvOTzmepjE9rANANlUjME+Mo00WJ97NhNB7/W7Q/yn26z
	 FOJEsOZa1ezr1oG94KUhM3WnygpHhPDni9SUNkKdvyB7xHwiEkBnaLWxCNkI2338SLA==
X-ARC-Authentication-Results: i=2; 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=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id DF6FD606A33E;
	Sat,  5 Dec 2026 22:04:16 +0000 (UTC)
X-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
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-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==
X-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==
X-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
X-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)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 062791F00936;
	Sat,  5 Dec 2026 22:04:09 +0000 (UTC)
X-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==
X-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
X-In-Reply-To: <20261204-net-next-mptcp-misc-feat-7-5-v1-3-1449de51adae@kernel.org>
X-sashiko-severity: Medium
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list