MPTCP Linux Development
 help / color / mirror / Atom feed
From: Chenguang Zhao <chenguang.zhao@linux.dev>
To: mptcp@lists.linux.dev
Cc: chenguang.zhao@linux.dev, Chenguang Zhao <zhaochenguang@kylinos.cn>
Subject: [PATCH mptcp-next RFC v5 2/3] mptcp: fallback immediately on MP_FAIL reception
Date: Wed, 19 Aug 2026 19:21:11 +0800	[thread overview]
Message-ID: <20260819112112.1985121-3-chenguang.zhao@linux.dev> (raw)
In-Reply-To: <20260819112112.1985121-1-chenguang.zhao@linux.dev>

From: Chenguang Zhao <zhaochenguang@kylinos.cn>

Call mptcp_try_fallback() right after the MP_FAIL response
ACK, and simplify mptcp_update_infinite_map() accordingly.

Fixes: 1e39e5a32ad7 ("mptcp: infinite mapping sending")
Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
---
 net/mptcp/pm.c       | 5 +++++
 net/mptcp/protocol.c | 8 +-------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index ba7c6f80a183..69701ac7e436 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -895,6 +895,11 @@ void mptcp_pm_mp_fail_received(struct sock *sk, u64 fail_seq)
 		pr_debug("MP_FAIL response received\n");
 		WRITE_ONCE(subflow->fail_tout, 0);
 	}
+
+	if (!mptcp_try_fallback(sk, MPTCP_MIB_MPFAILFALLBACK)) {
+		MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_FALLBACKFAILED);
+		mptcp_subflow_reset(sk);
+	}
 }
 
 static int mptcp_add_addr_len(int family, bool echo, bool port)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index f879b1061f2d..abe45a31ca5f 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1417,13 +1417,7 @@ static void mptcp_update_infinite_map(struct mptcp_sock *msk,
 
 	mpext->infinite_map = 1;
 	mpext->data_len = 0;
-
-	if (!mptcp_try_fallback(ssk, MPTCP_MIB_INFINITEMAPTX)) {
-		MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_FALLBACKFAILED);
-		mptcp_subflow_reset(ssk);
-		return;
-	}
-
+	MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_INFINITEMAPTX);
 	mptcp_subflow_ctx(ssk)->send_infinite_map = 0;
 }
 
-- 
2.25.1


  parent reply	other threads:[~2026-08-19 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 11:21 [PATCH mptcp-next RFC v5 0/3] mptcp: fallback to TCP on MP_FAIL with a single subflow Chenguang Zhao
2026-08-19 11:21 ` [PATCH mptcp-next RFC v5 1/3] mptcp: add MPFailFallback MIB counter Chenguang Zhao
2026-08-19 11:27   ` sashiko-bot
2026-08-19 11:21 ` Chenguang Zhao [this message]
2026-08-19 11:43   ` [PATCH mptcp-next RFC v5 2/3] mptcp: fallback immediately on MP_FAIL reception sashiko-bot
2026-08-19 11:21 ` [PATCH mptcp-next RFC v5 3/3] mptcp: reject new subflows after fallback Chenguang Zhao
2026-08-19 13:32 ` [PATCH mptcp-next RFC v5 0/3] mptcp: fallback to TCP on MP_FAIL with a single subflow MPTCP CI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260819112112.1985121-3-chenguang.zhao@linux.dev \
    --to=chenguang.zhao@linux.dev \
    --cc=mptcp@lists.linux.dev \
    --cc=zhaochenguang@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox