From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Florian Westphal <fw@strlen.de>,
Dmytro Shytyi <dmytro@shytyi.net>
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
linux-kernel@vger.kernel.org,
"Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
stable@vger.kernel.org
Subject: [PATCH net 5/7] mptcp: push queued data on subflows falling back at the handshake
Date: Mon, 16 Nov 2026 23:06:12 +0100 [thread overview]
Message-ID: <20261116-net-mptcp-misc-fixes-7-4-rc4-v1-5-bf7656de653e@kernel.org> (raw)
In-Reply-To: <20261116-net-mptcp-misc-fixes-7-4-rc4-v1-0-bf7656de653e@kernel.org>
With TCP Fast Open, the data written by an MPTCP server before the 3rd
ACK is not sent when this ACK arrives without MPTCP options, but only
when another event triggers a push, e.g. new data from the peer.
The previous commit pushes this data when the third ACK, with the
MP_CAPABLE option, makes a passive TFO subflow fully established. If
this ACK has no MPTCP options, e.g. because a middlebox removed them,
check_fully_established() falls back to TCP, and returns before this
push. The fallback case of mptcp_incoming_options(), which pushes the
pending data, is only reached with the next packets.
The fix used here is to push the pending data after this fallback too.
Not only for the passive TFO subflows: data can also be pending on the
client side, when the first ACK from the server has no MPTCP options,
e.g. if the window announced by the SYN+ACK was too small for it. Same
here, this data was then only sent when another event triggered a push.
This issue has been found by an AI code review agent (Clashiko), while
reviewing an earlier version of the previous commit. It has been
reproduced with a new Packetdrill test, where the MPTCP options are
removed from the third ACK. Without this patch, and before the earlier
commit "mptcp: arm the rtx timer if a push leaves data behind", this
data was not sent:
server-tfo-fallback-write-before-3rd-ack.pkt:26: error handling packet: Timed out waiting for packet
Since this earlier commit, this data is sent, but only when the MPTCP
retransmission timer fires, here after one second, as the test increases
its interval:
server-tfo-fallback-write-before-3rd-ack.pkt:26: error handling packet: timing error: expected outbound packet at 0.235869 sec but happened at 1.144189 sec; tolerance 0.100000 sec
The client side case has been reported by Sashiko, while reviewing an
earlier version of this commit, and confirmed with another new
Packetdrill test, where the client writes more data than the window of
the SYN+ACK, before an ACK without MPTCP options. Without this patch:
v1_connect_fallback_pending_data.pkt:30: error handling packet: timing error: expected outbound packet at 0.251394 sec but happened at 1.195904 sec; tolerance 0.100000 sec
Two Fixes tags: the passive TFO case comes from the first commit, and
the client side one from the second one.
Fixes: 36b122baf6a8 ("mptcp: add subflow_v(4,6)_send_synack()")
Fixes: 6f8a612a33e4 ("mptcp: keep track of advertised windows right edge")
Cc: stable@vger.kernel.org
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/options.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index bcf3440d1901..617358ff7f99 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1035,6 +1035,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_FALLBACKFAILED);
goto reset;
}
+ /* this ACK will not reach the fallback path: push from here */
+ mptcp_data_lock(sk);
+ __mptcp_check_push(sk, ssk);
+ mptcp_data_unlock(sk);
return false;
}
--
2.55.0
next prev parent reply other threads:[~2026-11-16 22:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 22:06 [PATCH net 0/7] mptcp: misc fixes for v7.4-rc4 Matthieu Baerts (NGI0)
2026-11-16 22:06 ` [PATCH net 1/7] mptcp: do not use a raised snd_wnd for the send window Matthieu Baerts (NGI0)
2026-11-16 22:06 ` [PATCH net 2/7] mptcp: push pending data after a sendmsg copy fault Matthieu Baerts (NGI0)
2026-11-17 22:29 ` netdev-bot+sashiko
2026-11-18 22:01 ` Matthieu Baerts
2026-11-16 22:06 ` [PATCH net 3/7] mptcp: use sk instead of casting msk in check_fully_established() Matthieu Baerts (NGI0)
2026-11-16 22:06 ` [PATCH net 4/7] mptcp: push queued data on passive TFO subflows becoming established Matthieu Baerts (NGI0)
2026-11-17 22:29 ` netdev-bot+sashiko
2026-11-18 22:02 ` Matthieu Baerts
2026-11-16 22:06 ` Matthieu Baerts (NGI0) [this message]
2026-11-17 22:29 ` [PATCH net 5/7] mptcp: push queued data on subflows falling back at the handshake netdev-bot+sashiko
2026-11-18 22:02 ` Matthieu Baerts
2026-11-16 22:06 ` [PATCH net 6/7] mptcp: don't send a FIN before the pending data on fallback Matthieu Baerts (NGI0)
2026-11-17 22:29 ` netdev-bot+sashiko
2026-11-18 22:03 ` Matthieu Baerts
2026-11-16 22:06 ` [PATCH net 7/7] mptcp: fix dummy mapping of overlapping segments Matthieu Baerts (NGI0)
2026-11-17 22:29 ` netdev-bot+sashiko
2026-11-18 22:04 ` Matthieu Baerts
2026-11-18 22:05 ` [PATCH net 0/7] mptcp: misc fixes for v7.4-rc4 Matthieu Baerts
2026-11-20 2:32 ` Jakub Kicinski
2026-11-20 8:50 ` Matthieu Baerts
2026-11-20 2:40 ` patchwork-bot+netdevbpf
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=20261116-net-mptcp-misc-fixes-7-4-rc4-v1-5-bf7656de653e@kernel.org \
--to=matttbe@kernel.org \
--cc=davem@davemloft.net \
--cc=dmytro@shytyi.net \
--cc=edumazet@kernel.org \
--cc=fw@strlen.de \
--cc=geliang@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®