From: sashiko-bot@kernel.org
To: "Chenguang Zhao" <chenguang.zhao@linux.dev>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next RFC v4 2/2] mptcp: send MP_FAIL and infinite mapping on the same ACK
Date: Tue, 18 Aug 2026 09:30:25 +0000 [thread overview]
Message-ID: <20260818093026.46C4A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260818091417.2200986-3-chenguang.zhao@linux.dev>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] MP_FAIL is permanently dropped due to TCP options space exhaustion when packed alongside DSS and Timestamps.
- [High] Dropped pure ACKs cause a fatal connection reset because immediate fallback disables MPTCP options on retransmissions.
- [High] The send_infinite_map flag is cleared when transmitting a pure ACK, omitting the map from the first data packet if the ACK drops.
--
--- Patch [2]: [PATCH mptcp-next RFC v4 2/2] mptcp: send MP_FAIL and infinite mapping on the same ACK ---
commit fa151aec0663a3e5b6abb8fb25a4fd411a972b0a
Author: Chenguang Zhao <zhaochenguang@kylinos.cn>
mptcp: send MP_FAIL and infinite mapping on the same ACK
This commit updates the handling of an MP_FAIL response on a single subflow.
It emits the infinite mapping on the MP_FAIL reply ACK and then immediately
transitions the socket into fallback mode.
> mptcp: send MP_FAIL and infinite mapping on the same ACK
>
> On a single subflow, accepting MP_FAIL must leave MPTCP mode at once
> (RFC8684 §3.7). Emit the infinite mapping on the MP_FAIL reply ACK,
> then call mptcp_try_fallback() immediately after.
[Severity: High]
If we pack both the MP_FAIL and the infinite mapping on the same ACK,
is there enough TCP options space if timestamps are enabled?
With standard TCP Timestamps (12 bytes), the remaining option space is 28
bytes.
The infinite mapping requires at least 24 bytes (base + 64-bit map + ACK),
leaving at most 4 bytes.
Since MP_FAIL requires 12 bytes, will it fail the space check in
mptcp_established_options() and be silently dropped?
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index 2f571766db440..e4f8e976ff163 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
[ ... ]
> @@ -1567,6 +1589,15 @@ void mptcp_write_options(struct tcphdr *th, __be32 *ptr, struct tcp_sock *tp,
> TCPOPT_NOP << 8 | TCPOPT_NOP, ptr);
> }
> ptr += 1;
> +
> + if (unlikely(mpext->infinite_map)) {
> + subflow = mptcp_subflow_ctx(ssk);
> + if (subflow->send_infinite_map) {
> + subflow->send_infinite_map = 0;
[Severity: High]
Does clearing this flag on a pure ACK risk losing the infinite mapping if
the network drops the packet?
Since TCP does not retransmit pure ACKs, the infinite mapping would need to
be piggybacked on the next data packet.
If we clear the send_infinite_map flag here, will the next data packet fail
to include the mapping and transmit as plain TCP instead?
> + MPTCP_INC_STATS(sock_net(ssk),
> + MPTCP_MIB_INFINITEMAPTX);
> + }
> + }
> }
>
> /* We might need to add MP_FAIL options in rare cases */
[ ... ]
> diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
> index d7c5b50b34cc9..351f9c998d7b6 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)) {
[Severity: High]
Does entering fallback immediately after sending the pure ACK prevent
retransmission of MPTCP options if the ACK is lost?
If the initial pure ACK drops, the remote peer will retransmit its MP_FAIL.
When the local stack responds with another pure ACK, skb is NULL.
Because the socket is already in fallback mode, it looks like
mptcp_established_options() will fail the fallback check:
if (unlikely(__mptcp_check_fallback(msk) && !mptcp_check_infinite_map(skb)))
return 0;
Could this permanently prevent recovery by omitting the MP_FAIL option on
subsequent ACKs?
> + MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_FALLBACKFAILED);
> + mptcp_subflow_reset(sk);
> + }
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260818091417.2200986-1-chenguang.zhao@linux.dev?part=2
next prev parent reply other threads:[~2026-08-18 9:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 9:14 [PATCH mptcp-next RFC v4 0/2] mptcp: fallback to TCP on MP_FAIL with a single subflow Chenguang Zhao
2026-08-18 9:14 ` [PATCH mptcp-next RFC v4 1/2] mptcp: add MPFailFallback MIB Chenguang Zhao
2026-08-18 9:24 ` sashiko-bot
2026-08-18 9:14 ` [PATCH mptcp-next RFC v4 2/2] mptcp: send MP_FAIL and infinite mapping on the same ACK Chenguang Zhao
2026-08-18 9:30 ` sashiko-bot [this message]
2026-08-18 16:19 ` Matthieu Baerts
2026-08-19 11:16 ` Chenguang Zhao
2026-08-19 16:06 ` Matthieu Baerts
2026-08-18 10:21 ` [PATCH mptcp-next RFC v4 0/2] 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=20260818093026.46C4A1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=chenguang.zhao@linux.dev \
--cc=mptcp@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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