From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: Florian Westphal <fw@strlen.de>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH RFC mptcp] net: tcp: prevent transition to FIN_WAIT2 when mptcp has unacked data_fin
Date: Fri, 19 Aug 2022 17:20:49 +0200 [thread overview]
Message-ID: <361c7c0e-29bf-af9a-8ce0-e9668f9e2267@tessares.net> (raw)
In-Reply-To: <20220818162123.30198-1-fw@strlen.de>
Hi Florian,
On 18/08/2022 18:21, Florian Westphal wrote:
> When an mptcp connection closes down, a MPTCP-level DATA_FIN (flag in mp tcp
> options) is sent.
>
> We should wait until we can be sure the peer has received the mptcp-level ack of
> that DATA_FIN. Else, we can end up with the last mptcp subflow in FIN_WAIT2 state.
>
> In that state, TCP won't respond to incoming ACK anymore, because no
> progress happens from TCP point of view.
Thank you for looking at that!
(...)
> Its possible to either change tw_sk to have enough mptcp context to be
> able to send a packet back
Do you think changing tw_sk would be accepted upstream?
That would be good for MPTCP from a perf point of view I suppose. Or
maybe not worth it?
If it is worth it, could we have a 'struct mptcp_timewait_sock' for
MPTCP case, extending 'struct tcp_timewait_sock'? But then I guess the
"annoying" thing for upstream is that we might have to modify or split
functions from tcp_minisocks.c if we cannot add more indirections.
> or we can supress/delay the tw_sock
> transition.
All the time for MPTCP sockets?
Do you think it the impact will just be minor?
> This is what classic TCP is doing when it receives another
> FIN while in FIN1 state.
>
> This change makes the test case work (another dss ack is sent), but
> there may be other corner cases where we need to delay the sk ->
> tw_sk transition.
We didn't hear anything about other cases so far, we can also see case
by case for this situation (corner cases at the end of a connection) :)
> If the general idea looks ok, perhaps its better to replace
>
> tcp_time_wait(sk, skb, ..
>
> with a mptcp aware helper, e.g. tcp_time_wait_check(sk, skb, ..
> and place the option parsing for mptcp-subflows there?
Would it be better because we would put this in tcp_minisocks.c? Or just
to isolate MPTCP specific function in a small and dedicated function?
I don't have any strong opinion about one or the other.
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
next prev parent reply other threads:[~2022-08-19 15:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 16:21 [PATCH RFC mptcp] net: tcp: prevent transition to FIN_WAIT2 when mptcp has unacked data_fin Florian Westphal
2022-08-18 18:40 ` net: tcp: prevent transition to FIN_WAIT2 when mptcp has unacked data_fin: Tests Results MPTCP CI
2022-08-19 15:20 ` Matthieu Baerts [this message]
2022-08-22 11:02 ` [PATCH RFC mptcp] net: tcp: prevent transition to FIN_WAIT2 when mptcp has unacked data_fin Paolo Abeni
2022-08-22 12:32 ` Florian Westphal
2022-08-23 15:54 ` Paolo Abeni
2022-09-02 9:17 ` Paolo Abeni
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=361c7c0e-29bf-af9a-8ce0-e9668f9e2267@tessares.net \
--to=matthieu.baerts@tessares.net \
--cc=fw@strlen.de \
--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).