MPTCP Linux Development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: gang.yan@linux.dev, Paolo Abeni <pabeni@redhat.com>,
	Chenguang Zhao <chenguang.zhao@linux.dev>,
	mptcp@lists.linux.dev
Cc: Chenguang Zhao <zhaochenguang@kylinos.cn>
Subject: Re: [PATCH export v3 2/4] mptcp: reject joins after fallback in mptcp_is_fully_established
Date: Fri, 14 Aug 2026 17:45:02 +0200	[thread overview]
Message-ID: <4bc4a5c1-c6ca-4384-a355-ca709cd52f48@kernel.org> (raw)
In-Reply-To: <3c9241d11965180046042f4c6079ebb1e38b54dd@linux.dev>

Hi Gang,

On 14/08/2026 05:02, gang.yan@linux.dev wrote:
> August 14, 2026 at 1:42 AM, "Matthieu Baerts" <matttbe@kernel.org mailto:matttbe@kernel.org?to=%22Matthieu%20Baerts%22%20%3Cmatttbe%40kernel.org%3E > wrote:
>>
>> In addition, in the case we are trying to fix here, the MP_FAIL is
>> received before switching to fully established: the RFC doesn't explain
>> this particular case, but it sounds like there is no need to send the
>> infinite mapping, and a fallback can be done directly *I think*. The
>> thing is this situation shouldn't happen: we are not supposed to receive
>> an MP_FAIL at that stage, no data has been exchanged at the MPTCP level,
>> so let's do the minimal -- i.e. just a fallback -- to avoid issues and
>> reduce the complexity, no?
>>
> 
> Hi Matt, 
> 
> Thanks for your explanation. I have a quick thought:
> 
> Can we check the 'subflow->send_mp_fail' in 'subflow_finish_connect'? like:
> 
> '''
> ...
>  543         if (subflow->request_mptcp) {
>  544                 if (!(mp_opt.suboptions & OPTION_MPTCP_MPC_SYNACK)) {
>  545                         if (!mptcp_try_fallback(sk,
>  546                                                 MPTCP_MIB_MPCAPABLEACTIVEFALLBACK)) {
>  547                                 MPTCP_INC_STATS(sock_net(sk),
>  548                                                 MPTCP_MIB_FALLBACKFAILED);
>  549                                 goto do_reset;
>  550                         }
>  551 
>  552                         goto fallback;
>  553                 }
>              if (subflow->send_mp_fail)
>                              goto fallback;
>  554 
> ...
> '''

I don't know: it doesn't feel right to check this field there. Sending
the MP_FAIL reply and the infinite mapping in the same ACK, as you
suggested, seems better.

> Or, check msk->fully_established in pm_fail_received like this:
> '''
> @@ -901,6 +898,12 @@  void mptcp_pm_mp_fail_received(struct sock *sk, u64 fail_seq)
>  		subflow->send_mp_fail = 1;
>  		subflow->send_infinite_map = 1;
>  		tcp_send_ack(sk);
> +
> +		if (!msk->fully_established && !mptcp_try_fallback(sk, MPTCP_MIB_MPFAILFALLBACK)) {
> +			MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_FALLBACKFAILED);
> +			mptcp_subflow_reset(sk);
> +		}
> ''' 

Paolo noticed (in another email from this thread) this will not cover
the case we are trying to fix as we were already in fully_established.

But maybe we could try to fallback if that's possible, and if checksum
was not being used? I didn't check if it would be a good solution.

> Because the MP_FAIL specified in the RFC does not seem to actively trigger a fallback
> on its own; instead, it is triggered via the infinite mapping. If we modify the
> behavior of MP_FAIL in the regular path, I think it might be over-design and could
> introduce additional risks. What do you think?

Yes, but here, I'm only proposing doing a fallback for the cases not
covered by the RFC, i.e. single subflow, no checksum.

I think the simplest solution should be picked for this use-case that
shouldn't happen. Bounding MP_FAIL reply and infinite mapping in the
same ack seems interesting, and not just for this case, but it might be
"hacky" as you don't have an mpext in this case, no? Maybe a fallback is
"cleaner"?

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


  reply	other threads:[~2026-08-14 15:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  5:46 [PATCH export v3 0/4] mptcp: fix TCP fallback on single-subflow MP_FAIL Chenguang Zhao
2026-08-12  5:46 ` [PATCH export v3 1/4] mptcp: add MPFailFallback MIB Chenguang Zhao
2026-08-12  5:46 ` [PATCH export v3 2/4] mptcp: reject joins after fallback in mptcp_is_fully_established Chenguang Zhao
2026-08-12  9:45   ` Paolo Abeni
2026-08-12 15:32     ` Matthieu Baerts
2026-08-13  9:32       ` gang.yan
2026-08-13 17:42         ` Matthieu Baerts
2026-08-14  3:02           ` gang.yan
2026-08-14 15:45             ` Matthieu Baerts [this message]
2026-08-14  8:43       ` Paolo Abeni
2026-08-14  9:09         ` Matthieu Baerts
2026-08-14 11:06           ` Paolo Abeni
2026-08-14 16:49             ` Matthieu Baerts
2026-08-14 18:34               ` Matthieu Baerts
2026-08-13  8:45     ` Chenguang Zhao
2026-08-13 18:06       ` Matthieu Baerts
2026-08-12  5:46 ` [PATCH export v3 3/4] mptcp: reset subflow on MP_FAIL when OoO queue is non-empty Chenguang Zhao
2026-08-12  6:07   ` sashiko-bot
2026-08-12 10:02   ` Paolo Abeni
2026-08-13  8:45     ` Chenguang Zhao
2026-08-12  5:46 ` [PATCH export v3 4/4] mptcp: fallback to TCP on MP_FAIL with a single subflow Chenguang Zhao
2026-08-12 10:43   ` Paolo Abeni
2026-08-13  8:48     ` Chenguang Zhao
2026-08-12 10:47   ` Paolo Abeni
2026-08-13  8:50     ` Chenguang Zhao
2026-08-12  6:57 ` [PATCH export v3 0/4] mptcp: fix TCP fallback on single-subflow MP_FAIL MPTCP CI

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=4bc4a5c1-c6ca-4384-a355-ca709cd52f48@kernel.org \
    --to=matttbe@kernel.org \
    --cc=chenguang.zhao@linux.dev \
    --cc=gang.yan@linux.dev \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=zhaochenguang@kylinos.cn \
    /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