From: Geliang Tang <geliang@kernel.org>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-net v3 11/50] mptcp: no sf left: process pending MP_FASTCLOSE
Date: Tue, 01 Dec 2026 16:59:56 +0800 [thread overview]
Message-ID: <e14fc527a487ec7083a39d8f9cf655452eab1e6e.camel@kernel.org> (raw)
In-Reply-To: <b2603ef7-0095-45c3-8c42-01d64d62bcbd@kernel.org>
Hi Matt,
On Fri, 2026-11-27 at 19:57 +0100, Matthieu Baerts wrote:
> Hi Geliang,
>
> Thank you for the review!
>
> On 27/11/2026 02:12, Geliang Tang wrote:
> > Hi Matt,
> >
> > On Tue, 2026-11-24 at 22:59 +0100, Matthieu Baerts (NGI0) wrote:
> > > When the last subflow is closed while the MPTCP socket is no longer in
> > > the ESTABLISHED state, e.g. in CLOSE_WAIT after a DATA_FIN, the MPTCP
> > > socket moves to TCP_CLOSE. But this subflow could have been closed by a
> > > reset carrying an MP_FASTCLOSE, not processed yet: if this reset is
> > > received while the worker is running, after mptcp_check_fastclose(), and
> > > before __mptcp_close_subflow(). At the next run of the worker, the MPTCP
> > > socket being closed, the MP_FASTCLOSE is ignored, and no error is
> > > reported.
> > >
> > > This issue has been observed with the "fastclose test" subtest from
> > > mptcp_join.sh: after the DATA_FIN from the client, then its
> > > MP_FASTCLOSE, the server, still having data to send, was killed after
> > > the timeout:
> > >
> > > [FAIL] client exit code 0, server 143
> > >
> > > Since commit "mptcp: wake up blocked senders when no sf left", this
> > > subtest no longer fails: SEND_SHUTDOWN is set in this case, and the
> > > server gets EPIPE when writing, which is expected there. But the reset
> > > is still not reported. This has been confirmed with a debug patch
> > > keeping the worker busy until the subflow is closed, and Packetdrill
> > > scripts sending an MP_FASTCLOSE in this window: in CLOSE_WAIT, SO_ERROR
> > > was 0 instead of EPIPE, and poll() did not report EPOLLERR; in
> > > FIN_WAIT2, read() returned ENOTCONN instead of ECONNRESET:
> > >
> > > fastclose_close_wait_race_err.pkt:26: runtime error in getsockopt call: Bad getsockopt optval: expected: 32 actual: 0
> > > fastclose_fin_wait2_race_read.pkt:28: runtime error in read call: Expected errno 104 (Connection reset by peer) but got 107 (Transport endpoint is not connected)
> > >
> > > To fix this, process a pending MP_FASTCLOSE before the close, if the
> > > socket is still in use.
> > >
> > > Fixes: 27e5ccc2d5a5 ("mptcp: fix dangling connection hang-up")
> > > Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> > > ---
> > > v2: new, for an issue causing a flaky selftest
> > > v3: msg: the subtest no longer fails since patch 7, and the remaining
> > > issue, checked with Packetdrill (Clashiko)
> > > ---
> > > net/mptcp/protocol.c | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> > > index 5d916c6b43f4..bcdad00d3573 100644
> > > --- a/net/mptcp/protocol.c
> > > +++ b/net/mptcp/protocol.c
> > > @@ -2705,6 +2705,8 @@ static void mptcp_cleanup_ssk_backlog(struct sock *sk, struct sock *ssk)
> > > mptcp_data_unlock(sk);
> > > }
> > >
> > > +static void mptcp_check_fastclose(struct mptcp_sock *msk);
> > > +
> >
> > Would it be more appropriate to move the definition of mptcp_check_rcv_close()
> > helper from patch 12 into this patch?
>
> It's a good idea, but I prefer not to do that for net and keep the patch
> as small as possible. The patch 11/50 can be backported up to v5.10:
> better to keep it small. While the next one is for v6.19 (so only
> backported to v7.3).
I agree.
Reviewed-by: Geliang Tang <geliang@kernel.org>
Thanks,
-Geliang
>
> Cheers,
> Matt
next prev parent reply other threads:[~2026-12-01 9:00 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 21:59 [PATCH mptcp-net v3 00/50] mptcp: misc fixes Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 01/50] mptcp: keep an orphan while it can send its data Matthieu Baerts (NGI0)
2026-11-25 1:16 ` Mat Martineau
2026-11-25 1:17 ` Mat Martineau
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 02/50] mptcp: limit an orphan probing a zero window Matthieu Baerts (NGI0)
2026-11-25 1:19 ` Mat Martineau
2026-11-24 21:59 ` [PATCH mptcp-net v3 03/50] mptcp: count orphans as TCP does Matthieu Baerts (NGI0)
2026-11-25 1:21 ` Mat Martineau
2026-11-24 21:59 ` [PATCH mptcp-net v3 04/50] mptcp: return EOF after a DATA_FIN, " Matthieu Baerts (NGI0)
2026-11-26 1:57 ` Mat Martineau
2026-11-26 2:59 ` Geliang Tang
2026-11-26 8:06 ` Matthieu Baerts
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 05/50] mptcp: let TCP send orphan data after fallback Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 06/50] mptcp: reset the subflow on abort " Matthieu Baerts (NGI0)
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 07/50] mptcp: wake up blocked senders when no sf left Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 08/50] mptcp: set SEND_SHUTDOWN on close by an sf error Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 09/50] mptcp: start close timeout on initial sf shutdown Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 10/50] mptcp: process a DATA_FIN received with old data Matthieu Baerts (NGI0)
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 11/50] mptcp: no sf left: process pending MP_FASTCLOSE Matthieu Baerts (NGI0)
2026-11-27 1:12 ` Geliang Tang
2026-11-27 18:57 ` Matthieu Baerts
2026-12-01 8:59 ` Geliang Tang [this message]
2026-11-24 21:59 ` [PATCH mptcp-net v3 12/50] mptcp: no sf left: process pending DATA_FIN Matthieu Baerts (NGI0)
2026-11-24 22:33 ` sashiko-bot
2026-11-26 16:50 ` Matthieu Baerts
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 13/50] mptcp: process pending close events at accept() Matthieu Baerts (NGI0)
2026-11-27 1:06 ` Geliang Tang
2026-11-24 21:59 ` [PATCH mptcp-net v3 14/50] mptcp: report errors received before accept() Matthieu Baerts (NGI0)
2026-11-27 1:02 ` Geliang Tang
2026-11-27 1:04 ` Geliang Tang
2026-11-24 21:59 ` [PATCH mptcp-net v3 15/50] mptcp: clear sk_err on connect(), as TCP does Matthieu Baerts (NGI0)
2026-11-26 6:40 ` Geliang Tang
2026-11-26 8:15 ` Matthieu Baerts
2026-11-24 21:59 ` [PATCH mptcp-net v3 16/50] mptcp: clear DEFER_CONNECT on disconnect Matthieu Baerts (NGI0)
2026-11-26 6:41 ` Geliang Tang
2026-11-24 21:59 ` [PATCH mptcp-net v3 17/50] mptcp: report sf aborts during deferred connect Matthieu Baerts (NGI0)
2026-11-27 1:00 ` Geliang Tang
2026-11-24 21:59 ` [PATCH mptcp-net v3 18/50] mptcp: no fastclose reset from SYN_SENT subflows Matthieu Baerts (NGI0)
2026-11-26 7:04 ` Geliang Tang
2026-11-26 7:35 ` Matthieu Baerts
2026-11-26 8:02 ` Geliang Tang
2026-11-24 21:59 ` [PATCH mptcp-net v3 19/50] mptcp: fastopen: keep listeners and connections Matthieu Baerts (NGI0)
2026-11-26 8:20 ` Geliang Tang
2026-11-24 21:59 ` [PATCH mptcp-net v3 20/50] mptcp: don't inherit fastopening from a listener Matthieu Baerts (NGI0)
2026-11-26 7:07 ` Geliang Tang
2026-11-24 21:59 ` [PATCH mptcp-net v3 21/50] mptcp: drop non-MP_JOIN cookie ACKs on PM listeners Matthieu Baerts (NGI0)
2026-11-27 1:17 ` Geliang Tang
2026-11-24 21:59 ` [PATCH mptcp-net v3 22/50] mptcp: close a subflow reset for a bad mapping Matthieu Baerts (NGI0)
2026-11-27 1:17 ` Geliang Tang
2026-11-24 21:59 ` [PATCH mptcp-net v3 23/50] mptcp: pm: kernel: count endpoint listeners as sockets in use Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 24/50] mptcp: count a listener once when listen() is called again Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 25/50] mptcp: send the infinite map in a single segment Matthieu Baerts (NGI0)
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 26/50] mptcp: keep room for infinite map after fallback Matthieu Baerts (NGI0)
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 27/50] mptcp: do not fallback while old data is in flight Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 28/50] mptcp: stop resending data to a peer that fell back Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 29/50] mptcp: don't resend data acked without MPTCP opts Matthieu Baerts (NGI0)
2026-11-24 22:36 ` sashiko-bot
2026-11-26 16:53 ` Matthieu Baerts
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 30/50] mptcp: pm: kernel: don't count signal+subflow ID 0 endp Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 31/50] selftests: mptcp: join: check re-adding " Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 32/50] mptcp: reclaim forward memory after coalescing skbs Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 33/50] mptcp: don't charge a shared page twice at accept() Matthieu Baerts (NGI0)
2026-11-26 2:20 ` Mat Martineau
2026-11-26 14:32 ` Matthieu Baerts
2026-11-24 21:59 ` [PATCH mptcp-net v3 34/50] mptcp: don't charge the backlog " Matthieu Baerts (NGI0)
2026-11-26 2:43 ` Mat Martineau
2026-11-26 14:41 ` Matthieu Baerts
2026-11-24 21:59 ` [PATCH mptcp-net v3 35/50] mptcp: don't charge a subflow twice when it joins during accept() Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 36/50] mptcp: continue the last mapping after a fallback Matthieu Baerts (NGI0)
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 37/50] mptcp: keep the first byte after a simult connect Matthieu Baerts (NGI0)
2026-11-24 22:45 ` sashiko-bot
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 38/50] mptcp: move to ESTABLISHED " Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 39/50] mptcp: fix MSG_PEEK after a partly peeked skb Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 40/50] mptcp: send the DATA_ACK after moving the backlog Matthieu Baerts (NGI0)
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 21:59 ` [PATCH mptcp-net v3 41/50] selftests: mptcp: join: infinite map: no spurious rtx Matthieu Baerts (NGI0)
2026-11-24 21:59 ` [PATCH mptcp-net v3 42/50] selftests: mptcp: connect: trunc: wait for acks Matthieu Baerts (NGI0)
2026-11-24 22:00 ` [PATCH mptcp-net v3 43/50] mptcp: order write_seq and DATA_FIN flag Matthieu Baerts (NGI0)
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 22:00 ` [PATCH mptcp-net v3 44/50] mptcp: order write_seq and DATA_FIN flag for fallback Matthieu Baerts (NGI0)
2026-11-24 22:00 ` [PATCH mptcp-net v3 45/50] Squash to "bpf: Add mptcp packet scheduler struct_ops" Matthieu Baerts (NGI0)
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 22:00 ` [PATCH mptcp-net v3 46/50] Squash to "bpf: Export mptcp packet scheduler helpers" Matthieu Baerts (NGI0)
2026-11-24 22:45 ` sashiko-bot
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 22:00 ` [PATCH mptcp-next mptcp-net v3 47/50] mptcp: push pending data after a fallback on reception Matthieu Baerts (NGI0)
2026-11-24 22:00 ` [PATCH mptcp-next mptcp-net v3 48/50] mptcp: report errors as TCP does when closing Matthieu Baerts (NGI0)
2026-11-24 22:52 ` sashiko-bot
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-24 22:00 ` [PATCH mptcp-next mptcp-net v3 49/50] mptcp: trace: name all the mapping statuses Matthieu Baerts (NGI0)
2026-11-24 22:00 ` [PATCH RFC mptcp-next mptcp-net v3 50/50] mptcp: reset when the DSS disappears after a DATA_ACK Matthieu Baerts (NGI0)
2026-11-24 22:36 ` sashiko-bot
2026-11-26 23:29 ` netdev-bot+sashiko
2026-11-25 0:39 ` [PATCH mptcp-net v3 00/50] mptcp: misc fixes MPTCP CI
2026-11-26 16:54 ` Matthieu Baerts
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=e14fc527a487ec7083a39d8f9cf655452eab1e6e.camel@kernel.org \
--to=geliang@kernel.org \
--cc=matttbe@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.