[PATCH mptcp 6.1.y] mptcp: continue marking the first subflow as UNCONNECTED

Matthieu Baerts (NGI0) posted 1 patch 2 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20240228095858.4117568-2-matttbe@kernel.org
There is a newer version of this series
net/mptcp/protocol.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH mptcp 6.1.y] mptcp: continue marking the first subflow as UNCONNECTED
Posted by Matthieu Baerts (NGI0) 2 months, 1 week ago
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.

Fixes: 7857e35ef10e ("mptcp: get rid of msk->subflow")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Notes:
 - This is specific to the 6.1 version having the partial backport.
---
 net/mptcp/protocol.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index cdabb00648bd..125825db642c 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -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;
-- 
2.43.0
Re: mptcp: continue marking the first subflow as UNCONNECTED: Tests Results
Posted by MPTCP CI 2 months, 1 week ago
Hi Matthieu,

Thank you for your modifications, that's great!

Our CI (Cirrus) did some validations with a debug kernel and here is its report:

- {"code":5,"message":
  - "NOT_FOUND: Task '4593138182914048' not found!"}:
  - Task: https://cirrus-ci.com/build/4593138182914048
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/4593138182914048/summary/summary.txt

- :
  - :
  - Task: 
  - Summary: 

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/405bf7b2a541


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Re: mptcp: continue marking the first subflow as UNCONNECTED: Build Failure
Posted by MPTCP CI 2 months, 1 week ago
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/20240228095858.4117568-2-matttbe@kernel.org/
  https://github.com/multipath-tcp/mptcp_net-next/actions/runs/8078767443

Status: failure
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/405bf7b2a541

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)
Re: mptcp: continue marking the first subflow as UNCONNECTED: Tests Results
Posted by MPTCP CI 2 months, 1 week ago
Hi Matthieu,

Thank you for your modifications, that's great!

Our CI (GitHub Action) did some validations and here is its report:

- KVM Validation: normal:
  - Script error! ❓:
  - Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/8078767442

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/405bf7b2a541


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)