πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by "Matthieu Baerts (NGI0)" Mon, 16 Nov 2026 22:06
[PATCH net 4/7] mptcp: push queued data on passive TFO subflows becoming established
#17470
Author: "Matthieu Baerts (NGI0)"
Date: Mon, 16 Nov 2026 22:06
64 lines
11424 bytes
With TCP Fast Open, the data written by an MPTCP server before the 3rd
ACK is not sent when this ACK arrives, but only when another event
triggers a push, e.g. new data from the peer. With a request/response
protocol, the client waits for the reply, which can then stay stuck.

A SYN with a valid TFO cookie creates a child socket right away, which
can be accepted while its subflow is still in the SYN_RECV state. The
MPTCP socket is already in the ESTABLISHED state: send() puts the data
in its write queue, but this data cannot be pushed to the subflow before
it is established, see __mptcp_subflow_active(). When the third ACK,
with the MP_CAPABLE option, arrives, check_fully_established() marks
the subflow as fully established, but nothing pushes the pending data:
this ACK has no DSS option, so ack_update_msk() is not called.

The fix used here is to push the pending data when a passive TFO subflow
becomes fully established. Checking subflow->is_mptfo is not enough:
since commit e00b63056fb4 ("mptcp: fastopen: only mark MPTFO subflows
with SYN data"), it is not set when the SYN has no data, while a child
is also created in this case. syn_fastopen_child is then used instead.

This issue has been reported by a user of proxies over MPTCP: the
clients put their requests in the SYN, and the replies from the targets
close to the server were stuck. It has been reproduced with new
Packetdrill tests, where the server writes data before the third ACK,
after a SYN with and without data. 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-write-before-3rd-ack.pkt:24: 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 tests increase
its interval:

  server-tfo-write-before-3rd-ack.pkt:24: error handling packet: timing error: expected outbound packet at 0.237174 sec but happened at 1.181857 sec; tolerance 0.100000 sec

Fixes: 36b122baf6a8 ("mptcp: add subflow_v(4,6)_send_synack()")
Cc: stable@vger.kernel.org
Suggested-by: Petar Sakic <petar.sakic@ink.fish>
Suggested-by: T S Rameshkumar <rameshkumar.t@phytecembedded.in>
Reported-by: Petar Sakic <petar.sakic@ink.fish>
Closes: https://lore.kernel.org/mptcp/CAFPPu1gU2Y-D+d4i3F0MoNkYK+e1U+=X3qf6QycjfKBw+8snPg@mail.gmail.com/
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 net/mptcp/options.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1c58468b985b..bcf3440d1901 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1047,6 +1047,8 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 
 	mptcp_data_lock(sk);
 	__mptcp_subflow_fully_established(msk, subflow, mp_opt);
+	if (tcp_sk(ssk)->syn_fastopen_child)
+		__mptcp_check_push(sk, ssk);
 	mptcp_data_unlock(sk);
 
 check_notify:

-- 
2.55.0
Re: [PATCH net 4/7] mptcp: push queued data on passive TFO subflows becoming established
#18160
Author: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 22:29
69 lines
10598 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message of "mptcp: push queued data on passive TFO
  subflows becoming established" describes behaviour that depends on an…

--

mptcp: push queued data on passive TFO subflows becoming established

With TCP Fast Open, data written by an MPTCP server before the third ACK
could stay queued after that ACK, because the ACK carries MP_CAPABLE
without DSS, so ack_update_msk() is never called. This commit makes
check_fully_established() call __mptcp_check_push() when a subflow becomes
fully established on a passive TFO child (syn_fastopen_child), so the data
is pushed at that point.

Closes: https://lore.kernel.org/mptcp/CAFPPu1gU2Y-D+d4i3F0MoNkYK+e1U+=X3qf6QycjfKBw+8snPg@mail.gmail.com/

> 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-write-before-3rd-ack.pkt:24: 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 tests increase
> its interval:

[Severity: Low]
Which tree is "mptcp: arm the rtx timer if a push leaves data behind" in?

That commit doesn't seem to be present here, either at this commit or at
the end of the series. The following patch, "mptcp: push queued data on
subflows falling back at the handshake", refers to it the same way. Neither
message gives a SHA or a lore link for it.

In net/mptcp/protocol.c, __mptcp_push_pending() still arms the rtx timer
only when data was copied:

net/mptcp/protocol.c:__mptcp_push_pending() {
    ...
	/* Avoid scheduling the rtx timer if no data has been pushed; the timer
	 * will be updated on positive acks by __mptcp_cleanup_una().
	 */
	if (copied) {
		if (!mptcp_rtx_timer_pending(sk))
			mptcp_reset_rtx_timer(sk);
		mptcp_check_send_data_fin(sk);
	}
}

__mptcp_subflow_push_pending() also arms it only inside its if (copied)
block.

So in this tree, without this patch, the data would hit the "Timed out
waiting for packet" case. It would not be sent late, after the one second
delay.

Could the changelog say where that commit lives, for example with a SHA or
a lore link? That would let stable backporters find the dependency and see
how the two changes are ordered.

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116-net-mptcp-misc-fixes-7-4-rc4-v1-0-bf7656de653e%40kernel.org
Re: [PATCH net 4/7] mptcp: push queued data on passive TFO subflows becoming established
#18772
Author: Matthieu Baerts
Date: Wed, 18 Nov 2026 22:02
39 lines
12538 bytes
Hello,

On 17/11/2026 23:29, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
> 
> Low priority / nit picks for your consideration:

(...)

>> 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-write-before-3rd-ack.pkt:24: 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 tests increase
>> its interval:
> 
> [Severity: Low]
> Which tree is "mptcp: arm the rtx timer if a push leaves data behind" in?

Arf, I forgot to remove that when I cherry-picked this fix. That's a
detail, it's a fix pending on the MPTCP ML, not applied yet:


https://lore.kernel.org/20261113-mptcp-cmason-fixes-v1-7-9205b77e9a2f@kernel.org

There is no dependency: in this tree, the data was never sent, as
described for the case "before this earlier commit". I suggest ignoring
that, it's not directly linked, and this patch will come soon.

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads