From: Abdul Wasey <w453y.me@gmail.com>
To: mptcp@lists.linux.dev
Cc: Matthieu Baerts <matttbe@kernel.org>,
Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
"Mohit P. Tahiliani" <tahiliani@nitk.edu.in>,
Gang Yan <gang.yan@linux.dev>
Subject: [PATCH mptcp-net v10 0/2] mptcp: pm: in-kernel: fullmesh: re-add of the initial subflow endp
Date: Fri, 27 Nov 2026 21:37:54 +0000 [thread overview]
Message-ID: <20261127213756.4154872-1-w453y.me@gmail.com> (raw)
With fullmesh endpoints, removing and re-adding the endpoint used by the
initial subflow never creates a new subflow from it: the closed initial
subflow stays in the conn_list, and makes the PM think the remote ID 0
is already used, or picks its reset remote address. If the initial
subflow was the only one, no address is left for the remote ID 0 at all.
Patch 1 fixes that, patch 2 adds tests for it.
Found with a router flapping one of its links: the link carrying the
initial subflow never rejoined the existing connections. Tested on top
of export-net: the new tests fail without patch 1, and the whole
mptcp_join.sh passes with it.
Changes in v10, after the review of v9 by Gang and Matthieu:
- Patch 1: use fill_remote_addr() for the remote ID 0 fallback, instead
of duplicating it.
- Patch 1: drop the comment above mptcp_subflow_is_closed(), and shorten
the one above the fallback.
- Rebased on top of export-net.
- v9: https://lore.kernel.org/mptcp/20261126101818.3916631-1-w453y.me@gmail.com/
Changes in v9, after the review of v8 by Matthieu:
- Patch 2: drop the test adding another endpoint after the removal of
the initial one: it already passed without patch 1.
- Patch 2: merge the test with the initial subflow alone into the first
one, to save the setup time: after the re-add, both endpoints are
removed, then the initial one is re-added alone.
- Rebased on top of export-net.
- v8: https://lore.kernel.org/mptcp/20261024111842.1069878-1-w453y.me@gmail.com/
Changes in v8, after the review of v7 by Sashiko on mptcp and on netdev,
and the MPTCP CI:
- Patch 2: use nftables in the "after reset" test, as the rest of
mptcp_join.sh does now: export-net also got be3b69f3cedf, so
${iptables} was empty there too, and the test failed on v7.
- Patch 2: stop the transfer and the event listeners before marking that
test as skipped: when all features are expected, the skip exits.
- v7: https://lore.kernel.org/mptcp/20261023110321.403874-1-w453y.me@gmail.com/
Changes in v7, after the review of v6 by Sashiko on netdev:
- Patch 2: in the two tests with the initial subflow alone, wait until
the PM worker has accounted the initial subflow endpoint before
removing it: a join on a third endpoint is created in the same worker
run, then that endpoint is removed. v6 only detected the race.
- Patch 2: wait a bit before counting the subflows after the removal,
as the other tests do: the closed subflow can still be listed.
- v6: https://lore.kernel.org/mptcp/20261022085041.211318-1-w453y.me@gmail.com/
Changes in v6, after the review of v5 by Sashiko on netdev:
- Patch 1: in the commit message, the closed initial subflow keeps its
remote address: only the destination port is zeroed, not the address.
- Patch 2: skip the "after reset" test if the iptables rule cannot be
added, instead of passing, and check that the reset closed the
subflow.
- Patch 2: in the two tests with the initial subflow alone, check it is
gone after the removal of its endpoint: the ESTABLISHED event comes
before the PM worker accounts that endpoint, so a removal right after
it can miss the subflow.
- v5: https://lore.kernel.org/mptcp/20261021070324.50533-1-w453y.me@gmail.com/
Changes in v5:
- Patch 1: when no subflow is left to take the remote ID 0 address from,
use the remote address of the MPTCP socket, as fill_remote_addr()
does. Without it, v4 also broke adding another endpoint after the
removal of the initial one, when it was the only subflow (Sashiko on
netdev).
- Patch 2: add two tests for the initial subflow alone: re-adding its
endpoint, and adding another endpoint.
- v4: https://lore.kernel.org/mptcp/20261019190558.465270-1-w453y.me@gmail.com/
Changes in v4:
- Patch 2: only check the joins when the iptables rule has been added
(Sashiko).
- v3: https://lore.kernel.org/mptcp/20261019185512.458313-1-w453y.me@gmail.com/
Changes in v3:
- Patch 2: use iptables instead of init_nftables(), which is only in
net-next (Sashiko).
- v2: https://lore.kernel.org/mptcp/20261019180306.382039-1-w453y.me@gmail.com/
Changes in v2:
- Patch 1: also skip the subflows in TCP_CLOSE: the initial subflow can
be disconnected and its context reset, clearing the 'closing' flag and
zeroing its remote address (Sashiko).
- Patch 2: validate this case too, by resetting the initial subflow
before removing its endpoint.
- v1: https://lore.kernel.org/mptcp/20261019170751.200446-1-w453y.me@gmail.com/
Abdul Wasey (2):
mptcp: pm: in-kernel: fullmesh: skip closed subflows
selftests: mptcp: join: re-add the initial subflow endp with fullmesh
net/mptcp/pm_kernel.c | 21 ++++-
.../testing/selftests/net/mptcp/mptcp_join.sh | 79 +++++++++++++++++++
2 files changed, 99 insertions(+), 1 deletion(-)
--
2.43.0
next reply other threads:[~2026-11-27 21:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 21:37 Abdul Wasey [this message]
2026-11-27 21:37 ` [PATCH mptcp-net v10 1/2] mptcp: pm: in-kernel: fullmesh: skip closed subflows Abdul Wasey
2026-11-28 0:02 ` gang.yan
2026-11-27 21:37 ` [PATCH mptcp-net v10 2/2] selftests: mptcp: join: re-add the initial subflow endp with fullmesh Abdul Wasey
2026-11-27 22:56 ` [PATCH mptcp-net v10 0/2] mptcp: pm: in-kernel: fullmesh: re-add of the initial subflow endp MPTCP CI
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=20261127213756.4154872-1-w453y.me@gmail.com \
--to=w453y.me@gmail.com \
--cc=gang.yan@linux.dev \
--cc=geliang@kernel.org \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=tahiliani@nitk.edu.in \
/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.