MPTCP Linux Development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Chenguang Zhao <chenguang.zhao@linux.dev>,
	mptcp@lists.linux.dev, 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 20:34:13 +0200	[thread overview]
Message-ID: <89cad67d-868c-4081-909f-84957d208ec4@kernel.org> (raw)
In-Reply-To: <0146a9b7-f2aa-4412-8cc4-0cdbdd41a40e@kernel.org>

On 14/08/2026 18:49, Matthieu Baerts wrote:
> Hi Paolo,
> 
> On 14/08/2026 13:06, Paolo Abeni wrote:
>> On 8/14/26 11:09 AM, Matthieu Baerts wrote:
>>> 14 Aug 2026 10:43:41 Paolo Abeni <pabeni@redhat.com>:
>>>> It's not clear to me what actually goes wrong and how. Do you have handy
>>>> a event sequence or stack trace demonstrating the critical scenario?
>>>
>>> Indeed, better with packetdrill scripts:
>>>
>>> https://github.com/chrisocean716-star/packetdrill/blob/bf9be7a7bee3687500444b284a9db2a0009a5252/gtests/net/mptcp/dss/dss_drop_after_data_fallback_server.pkt
>>>
>>> => A fallback is done, a subflow can be initiated, then rejected.
>>>
>>>
>>> https://github.com/chrisocean716-star/packetdrill/blob/fed57fab92c407eb433acdb8c8ce72bd8e3e2f37/gtests/net/mptcp/mp_join/mp_join_server_after_fallback.pkt
>>>
>>> => The MP_FAIL is partially ignored if received before being in fully
>>> established state.
>>
>> Thanks!
>>
>> I'm pretty sure there is a miss-intepretation of the 2nd case.
> 
> Thank you for having checked!
> 
>> The problem is not with `msk->fully_established`. AFAICS
>> msk->fully_established is true when the MP_FAIL is receive.
>>
>> The passive msk socket sets it at MPC ACK reception.
> 
> Indeed, I should have checked the code instead of only reading the
> comments from this test :)
> 
>> The problem is that, at MP_FAIL reception, the infinite mapping is not
>> sent immediately, but it's scheduled with the next xmit, and until such
>> point the msk does not perform the fallback.
>>
>> I think a proper solution would be bounding MP_FAIL (reply) and infinite
>> mapping in the same ack.
>>
>> As noted by Gang, it may require a new helper (build on top of the
>> tcp_send_ack).
> Sounds good to me!
> 
> What about the 1st case (fallback)?
> 
> Would it help to reset msk->fully_established in
> __mptcp_try_fallback()?(while holding the data_lock? not even sure it is
> needed at that stage)
> But here, we will also need to update subflow_token_join_request() to
> check mptcp_is_fully_established, or even mptcp_can_accept_new_subflow.
> (I can send a quick RFC patch)

Sent:
https://lore.kernel.org/20260814-mptcp-reset-mpj-early-v1-0-3ca3260f9474@kernel.org

> It would also benefit to the in-kernel PM and others places using
> mptcp_is_fully_established(). subflow->fully_established doesn't need to
> be reset.
> 
> Cheers,
> Matt

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


  reply	other threads:[~2026-08-14 18:34 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
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 [this message]
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=89cad67d-868c-4081-909f-84957d208ec4@kernel.org \
    --to=matttbe@kernel.org \
    --cc=chenguang.zhao@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