Re: [PATCH net 5/7] mptcp: push queued data on subflows falling back at the handshake
From: netdev-bot+sashiko
Date: Tue Nov 17 2026 - 17:29:58 EST
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] check_fully_established() (net/mptcp/options.c) now pushes
pending MPTCP data in its fallback branch every time that branch runs,…
--
mptcp: push queued data on subflows falling back at the handshake
This commit pushes pending MPTCP data from check_fully_established() when
a subflow that is not yet fully established falls back to TCP, because
the first established packet carries no MP_CAPABLE option. This covers
both passive TFO subflows and clients with data held back by a small
SYN+ACK window.
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index bcf3440d1901b..617358ff7f990 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;
> }
[Severity: Low]
Can this push also run while an incoming RST is being processed?
tcp_reset() calls into MPTCP before it tears the subflow down:
net/ipv4/tcp_input.c:tcp_reset() {
...
if (sk_is_mptcp(sk))
mptcp_incoming_options(sk, skb);
...
tcp_done_with_error(sk, err);
}
Take an active client whose mp_capable subflow has sent the third ACK but
has not yet received a DSS DATA_ACK, so subflow->fully_established is
still 0. Suppose an RST arrives with seq == rcv_nxt == ssn_offset + 1.
tcp_validate_incoming() accepts it and calls tcp_reset().
A plain RST from a middlebox, or an RST that only carries MP_RST, has no
OPTIONS_MPTCP_MPC. So check_fully_established() enters this fallback
branch, and mptcp_try_fallback() succeeds.
The new code then goes through:
__mptcp_check_push()
__mptcp_subflow_push_pending()
mptcp_sched_get_send()
__subflow_push_pending()
tcp_push()
mptcp_reset_rtx_timer()
In fallback mode, mptcp_sched_get_send() only checks
__tcp_can_send(msk->first) and sk_stream_memory_free(). The subflow is
still TCP_ESTABLISHED at this point, so it gets picked.
Right after this returns, tcp_done_with_error() purges the subflow write
queue and closes the subflow.
Usually TCP's own snd_wnd keeps the data off the wire. The work is still
wasted, though: dfrags are copied into a queue that is purged at once,
msk->snd_nxt moves forward, and the msk rtx timer is armed during
teardown.
What if the TCP window allows more than the msk window? For example,
data could have been left behind by an allocation failure, or snd_wnd
could have been updated by a segment without a DSS. Could data segments
then go on the wire after a valid RST was accepted?
The fallback block at the top of mptcp_incoming_options() already does
this for an msk that fell back earlier. This patch makes the same thing
reachable from the not-yet-fully-established case.
The comment says "this ACK", but the packet here can be an RST. Would it
make sense to skip the push when the skb has the RST flag set?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116-net-mptcp-misc-fixes-7-4-rc4-v1-0-bf7656de653e%40kernel.org