mptcp: continue marking the first subflow as UNCONNECTED
Subsystems (3)
Matthieu Baerts (NGI0)
maintainerPATCH 1/1 mptcp: continue marking the first subflow as UNCONNECTED
After the 'Fixes' commit mentioned below, which is a partial backport, the MPTCP worker was no longer marking the first subflow as "UNCONNECTED" when the socket was transitioning to TCP_CLOSE state.
As a result, in v6.1, it was no longer possible to reconnect to the just disconnected socket. Continue to do that like before, only for the first subflow.
A few refactoring have been done around the 'msk->subflow' in later versions, and it looks like this is not needed to do that there, but still needed in v6.1. Without that, the 'disconnect' tests from the mptcp_connect.sh selftest fail: they repeat the transfer 3 times by reconnecting to the server each time.
---
Notes:
- This is specific to the 6.1 version having the partial backport.
--- net/mptcp/protocol.c | 2 ++ 1 file changed, 2 insertions(+)
net/mptcp/protocol.c +2 -0
@@ -2440,6 +2440,8 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk, need_push = (flags &MPTCP_CF_PUSH ) &&__mptcp_retransmit_pending_data (sk);if (!dispose_it) {__mptcp_subflow_disconnect (ssk, subflow, flags); +if (msk->subflow && ssk == msk->subflow->sk) + msk->subflow->state =SS_UNCONNECTED ;release_sock (ssk); goto out;
Signature · 1 line
2.43.0
Re: mptcp: continue marking the first subflow as UNCONNECTED: Build Failure
Hi Matthieu,
Thank you for your modifications, that's great!
But sadly, our CI spotted some issues with it when trying to build it.
You can find more details there:
https://patchwork.kernel.org/project/mptcp/patch/[email protected]/
https://github.com/multipath-tcp/mptcp_net-next/actions/runs/8084822552
Status: cancelled
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/2c89af223cba
Feel free to reply to this email if you cannot access logs, if you need some support to fix the error, if this doesn't seem to be caused by your modifications or if the error is a false positive one.
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Greg KH
maintainerQuoted 14 lines · On Wed, Feb 28, 2024 at 06:21:21PM +0100, Matthieu Baerts (NGI0) wrote:
After the 'Fixes' commit mentioned below, which is a partial backport, the MPTCP worker was no longer marking the first subflow as "UNCONNECTED" when the socket was transitioning to
TCP_CLOSEstate.As a result, in v6.1, it was no longer possible to reconnect to the just disconnected socket. Continue to do that like before, only for the first subflow.
A few refactoring have been done around the '
msk->subflow' in later versions, and it looks like this is not needed to do that there, but still needed in v6.1. Without that, the 'disconnect' tests from themptcp_connect.shselftest fail: they repeat the transfer 3 times by reconnecting to the server each time.
Quoted 5 lines
Fixes 7857e35ef10e ("mptcp: get rid of msk->subflow")Signed-off-by Matthieu Baerts (NGI0) <[email protected]>---
Notes:
- This is specific to the 6.1 version having the partial backport.
All 6.1 backports now queued up, thanks!
greg k-h
Patch "mptcp: continue marking the first subflow as UNCONNECTED" has been added to the 5.4-stable tree
In reply to Matthieu Baerts (NGI0)This is a note to let you know that I've just added the patch titled
mptcp: continue marking the first subflow as UNCONNECTED
to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mptcp-continue-marking-the-first-subflow-as-unconnected.patch
and it can be found in the queue-5.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From [email protected] Mon Mar 4 09:10:32 2024
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Wed, 28 Feb 2024 18:21:21 +0100
Subject: mptcp: continue marking the first subflow as UNCONNECTED
To: [email protected], [email protected], [email protected]
Cc: MPTCP Upstream <[email protected]>, "Matthieu Baerts (NGI0)" <[email protected]>
Message-ID: <[email protected]>
From: "Matthieu Baerts (NGI0)" <[email protected]>
After the 'Fixes' commit mentioned below, which is a partial backport, the MPTCP worker was no longer marking the first subflow as "UNCONNECTED" when the socket was transitioning to TCP_CLOSE state.
As a result, in v6.1, it was no longer possible to reconnect to the just disconnected socket. Continue to do that like before, only for the first subflow.
A few refactoring have been done around the 'msk->subflow' in later versions, and it looks like this is not needed to do that there, but still needed in v6.1. Without that, the 'disconnect' tests from the mptcp_connect.sh selftest fail: they repeat the transfer 3 times by reconnecting to the server each time.
--- net/mptcp/protocol.c | 2 ++ 1 file changed, 2 insertions(+)
net/mptcp/protocol.c +2 -0
@@ -2440,6 +2440,8 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk, need_push = (flags &MPTCP_CF_PUSH ) &&__mptcp_retransmit_pending_data (sk);if (!dispose_it) {__mptcp_subflow_disconnect (ssk, subflow, flags); +if (msk->subflow && ssk == msk->subflow->sk) + msk->subflow->state =SS_UNCONNECTED ;release_sock (ssk); goto out;
Signature · 7 lines
2.43.0 Patches currently in stable-queue which might be from [email protected] are queue-5.4/mptcp-continue-marking-the-first-subflow-as-unconnected.patch
Greg KH
maintainerRe: Patch "mptcp: continue marking the first subflow as UNCONNECTED" has been added to the 5.4-stable tree
Quoted 7 lines · On Mon, Mar 04, 2024 at 09:11:22AM +0100, [email protected] wrote:
This is a note to let you know that I've just added the patch titled
mptcp: continue marking the first subflow as UNCONNECTED
to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
Oops, nope, my fault, this doesn't go to 5.4.y, sorry for the noise.
greg k-h
Patch "mptcp: continue marking the first subflow as UNCONNECTED" has been added to the 6.1-stable tree
In reply to Matthieu Baerts (NGI0)This is a note to let you know that I've just added the patch titled
mptcp: continue marking the first subflow as UNCONNECTED
to the 6.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mptcp-continue-marking-the-first-subflow-as-unconnected.patch
and it can be found in the queue-6.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From [email protected] Mon Mar 4 09:10:32 2024
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Wed, 28 Feb 2024 18:21:21 +0100
Subject: mptcp: continue marking the first subflow as UNCONNECTED
To: [email protected], [email protected], [email protected]
Cc: MPTCP Upstream <[email protected]>, "Matthieu Baerts (NGI0)" <[email protected]>
Message-ID: <[email protected]>
From: "Matthieu Baerts (NGI0)" <[email protected]>
After the 'Fixes' commit mentioned below, which is a partial backport, the MPTCP worker was no longer marking the first subflow as "UNCONNECTED" when the socket was transitioning to TCP_CLOSE state.
As a result, in v6.1, it was no longer possible to reconnect to the just disconnected socket. Continue to do that like before, only for the first subflow.
A few refactoring have been done around the 'msk->subflow' in later versions, and it looks like this is not needed to do that there, but still needed in v6.1. Without that, the 'disconnect' tests from the mptcp_connect.sh selftest fail: they repeat the transfer 3 times by reconnecting to the server each time.
--- net/mptcp/protocol.c | 2 ++ 1 file changed, 2 insertions(+)
net/mptcp/protocol.c +2 -0
@@ -2440,6 +2440,8 @@ static void __mptcp_close_ssk(struct soc need_push = (flags &MPTCP_CF_PUSH ) &&__mptcp_retransmit_pending_data (sk);if (!dispose_it) {__mptcp_subflow_disconnect (ssk, subflow, flags); +if (msk->subflow && ssk == msk->subflow->sk) + msk->subflow->state =SS_UNCONNECTED ;release_sock (ssk); goto out;
Patches currently in stable-queue which might be from [email protected] are
queue-6.1/mptcp-continue-marking-the-first-subflow-as-unconnected.patch queue-6.1/mptcp-fix-data-races-on-local_id.patch queue-6.1/mptcp-fix-duplicate-subflow-creation.patch queue-6.1/mptcp-fix-data-races-on-remote_id.patch