mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: Geliang Tang <geliangtang@gmail.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [MPTCP][PATCH mptcp-next] mptcp: don't fallback when data_fin enabled
Date: Fri, 7 May 2021 14:19:16 +0200	[thread overview]
Message-ID: <619cd782-bb39-c284-b59e-546a0aea3e3d@tessares.net> (raw)
In-Reply-To: <CA+WQbwvfLSqK5uWUmNrPwzazwXV2HNUXU_8HUz6dxifYmRTGCw@mail.gmail.com>

Hi Geliang,

On 07/05/2021 11:08, Geliang Tang wrote:
> Hi Matt,
> 
> Thanks for your review.
> 
> Matthieu Baerts <matthieu.baerts@tessares.net> 于2021年5月7日周五 下午4:51写道:
>>
>> Hi Geliang,
>>
>> On 07/05/2021 09:58, Geliang Tang wrote:
>>> This patch fixed this fallback error:
>>
>> Thank you for the patch!
>>
>>> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
>>> index f3e379a0f08d..940b32511443 100644
>>> --- a/net/mptcp/options.c
>>> +++ b/net/mptcp/options.c
>>> @@ -901,7 +901,7 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
>>>        * MP_JOIN subflows.
>>>        */
>>>       if (!mp_opt->mp_capable) {
>>> -             if (subflow->mp_join)
>>> +             if (subflow->mp_join || mptcp_data_fin_enabled(msk))>                   goto reset;
>>
>> I don't think we should send a reset here. For me this behaviour is normal.
> 
> Yes, we don't need to send a reset here. What about just return here?
> Something like this:
> 
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index 3428c163299b..bd62dadfefdb 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -905,6 +905,8 @@ static bool check_fully_established(struct
> mptcp_sock *msk, struct sock *ssk,
>         if (!mp_opt->mp_capable) {
>                 if (subflow->mp_join)
>                         goto reset;
> +               if (mptcp_data_fin_enabled(msk))
> +                       return false;
>                 subflow->mp_capable = 0;
>                 pr_fallback(msk);
>                 __mptcp_do_fallback(msk);

I think we still need to do a fallback here not to expect a DATA_ACK.
For example in __mptcp_check_send_data_fin(), we change the state
because we will not get a DATA_ACK.

So I think everything is OK there.

Just one thing: should we send a DATA_FIN if we were not "fully
established" when closing the socket?

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

  reply	other threads:[~2021-05-07 12:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  7:58 [MPTCP][PATCH mptcp-next] mptcp: don't fallback when data_fin enabled Geliang Tang
2021-05-07  8:51 ` Matthieu Baerts
2021-05-07  9:08   ` Geliang Tang
2021-05-07 12:19     ` Matthieu Baerts [this message]
2021-05-07 15:23       ` Matthieu Baerts
2021-05-08  2:58         ` Geliang Tang

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=619cd782-bb39-c284-b59e-546a0aea3e3d@tessares.net \
    --to=matthieu.baerts@tessares.net \
    --cc=geliangtang@gmail.com \
    --cc=mptcp@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).