All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-net v2] mptcp: push queued data on passive TFO subflows becoming established
@ 2026-10-12 11:10 T S Rameshkumar
  2026-10-12 12:24 ` MPTCP CI
  2026-10-14  0:11 ` netdev-bot+sashiko
  0 siblings, 2 replies; 6+ messages in thread
From: T S Rameshkumar @ 2026-10-12 11:10 UTC (permalink / raw)
  To: mptcp; +Cc: matttbe, petar.sakic, T S Rameshkumar

With TCP Fast Open on an MPTCP listener, if the server application
writes data while the passive subflow is still in SYN_RECV (after
consuming the client's SYN data but before the MP_CAPABLE third ACK
arrives), __mptcp_subflow_active() refuses transmission and the data
is queued into the msk write queue.

When the MPC third ACK arrives, the subflow transitions to
TCP_ESTABLISHED and is marked fully established in
check_fully_established(), but because the third ACK carries no
DSS data, the queued bytes remain stranded until the peer sends
more data.

Fix this in check_fully_established() by checking if the subflow
was doing passive TFO (subflow->is_mptfo). Under mptcp_data_lock(),
flush queued bytes via __mptcp_check_push().

Suggested-by: Petar Sakic <petar.sakic@ink.fish>
Reported-by: Petar Sakic <petar.sakic@ink.fish>
Closes: https://lore.kernel.org/netdev/CAFPPu1gU2Y-D+d4i3F0MoNkYK+e1U+=X3qf6QycjfKBw+8snPg@mail.gmail.com/
Fixes: fb7084501a61 ("mptcp: add support for TCP_FASTOPEN sockopt")
Signed-off-by: T S Rameshkumar <rameshkumar.t@phytecembedded.in>
---
v2:
 - Reverted moving/clearing is_mptfo since check_fully_established() is
   only called once and is_mptfo is read-only at this stage (Matthieu Baerts).
 - Added Suggested-by tag for Petar Sakic.
 - Rebased cleanly on top of mptcp_net-next export branch.
---
 net/mptcp/options.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 2bf368670..f5a258c7d 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1043,6 +1043,8 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 
 	mptcp_data_lock((struct sock *)msk);
 	__mptcp_subflow_fully_established(msk, subflow, mp_opt);
+	if (subflow->is_mptfo)
+		__mptcp_check_push((struct sock *)msk, ssk);
 	mptcp_data_unlock((struct sock *)msk);
 
 check_notify:
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-27 10:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 11:10 [PATCH mptcp-net v2] mptcp: push queued data on passive TFO subflows becoming established T S Rameshkumar
2026-10-12 12:24 ` MPTCP CI
2026-10-14  0:11 ` netdev-bot+sashiko
2026-10-14  8:28   ` Matthieu Baerts
2026-10-21 17:56     ` Matthieu Baerts
     [not found]       ` <CADRhS2to+Z-ZztOpfYhum5z4jXkUHFhnQL3+nVBJHJxe3NZjZw@mail.gmail.com>
2026-10-27 10:48         ` Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.