Currently, upon the reception of an ADD_ADDR (and when the fullmesh flag
is not used), the in-kernel PM will create new subflows using the local
address the routing configuration will pick.
It would be easier to pick local addresses from a selected list of
endpoints, and use it only once, than relying on routing rules.
Use case: both the client (C) and the server (S) have two addresses (a
and b). The client establishes the connection between C(a) and S(a).
Once established, the server announces its additional address S(b). Once
received, the client connects to it using its second address C(b).
Compared to a situation without the 'address' endpoint for C(b), the
client didn't use this address C(b) to establish a subflow to the
server's primary address S(a). So at the end, we have:
C S
C(a) --- S(a)
C(b) --- S(b)
In case of a 3rd address on each side (C(c) and S(c)), upon the
reception of an ADD_ADDR with S(c), the client should not pick C(b)
because it has already been used. C(c) should then be used.
Note that this situation is currently possible if C doesn't add any
endpoint, but configure the routing in order to pick C(b) for the route
to S(b), and pick C(c) for the route to S(c). That doesn't sound very
practical because it means knowing in advance the IP addresses that
will be used and announced by the server.
Patches 1 & 2: some clean-ups and refactoring.
Patch 3: "standardisation" and small perf improvement.
Patch 4: squash to patches for a commit queued for net-next.
Patch 5: new 'address' endpoints.
Patch 6: validation using selftests.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Matthieu Baerts (NGI0) (6):
mptcp: pm: in-kernel: remove stale_loss_cnt
mptcp: pm: in-kernel: reduce pernet struct size
mptcp: pm: in-kernel: compare IDs instead of addresses
Squash to "mptcp: pm: in-kernel: usable client side with C-flag"
mptcp: pm: in-kernel: add 'address' endpoints
selftests: mptcp: join: validate new 'address' endpoints
include/uapi/linux/mptcp.h | 6 +-
net/mptcp/pm_kernel.c | 228 ++++++++++++++++--------
net/mptcp/protocol.h | 9 +-
net/mptcp/sockopt.c | 2 +
tools/testing/selftests/net/mptcp/mptcp_join.sh | 56 ++++++
tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 9 +
6 files changed, 229 insertions(+), 81 deletions(-)
---
base-commit: 77807b94c731081ef3d97e96dabcea7aae2bfe15
change-id: 20250918-pm-kern-endp-add_addr-new-a20893e45389
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>