Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: matttbe@kernel.org
Cc: martineau@kernel.org, geliang@kernel.org, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, fw@strlen.de, dmytro@shytyi.net,
	netdev@vger.kernel.org, mptcp@lists.linux.dev,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	mason@kernel.org
Subject: Re: [PATCH net 5/7] mptcp: push queued data on subflows falling back at the handshake
Date: Tue, 17 Nov 2026 22:29:49 +0000	[thread overview]
Message-ID: <179495458948.3136.10805605417711396515@kernel.org> (raw)
In-Reply-To: <20261116-net-mptcp-misc-fixes-7-4-rc4-v1-5-bf7656de653e@kernel.org>

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

  reply	other threads:[~2026-11-17 22:29 UTC|newest]

Thread overview: 13+ 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-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-16 22:06 ` [PATCH net 5/7] mptcp: push queued data on subflows falling back at the handshake Matthieu Baerts (NGI0)
2026-11-17 22:29   ` netdev-bot+sashiko [this message]
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-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

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=179495458948.3136.10805605417711396515@kernel.org \
    --to=netdev-bot+sashiko@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=mason@kernel.org \
    --cc=matttbe@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