Skip to content

Conversation

@matttbe
Copy link
Member

@matttbe matttbe commented Oct 9, 2025

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 'laminar' 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.

laminar, like the idea of laminar flows: the different subflows don't mix with each other on an endpoint, unlike the "turbulent" way traffic is mixed by fullmesh.

This new flag is then added to mptcpd as well.

Link: multipath-tcp/mptcp_net-next#503
Link: https://git.kernel.org/netdev/net-next/c/539f6b9de39e

@coveralls
Copy link

coveralls commented Oct 9, 2025

Pull Request Test Coverage Report for Build 19644256155

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 57 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-1.6%) to 67.044%

Files with Coverage Reduction New Missed Lines %
src/path_manager.c 8 29.25%
src/netlink_pm_upstream.c 49 73.94%
Totals Coverage Status
Change from base Build 19633896411: -1.6%
Covered Lines: 1481
Relevant Lines: 2209

💛 - Coveralls

@matttbe matttbe force-pushed the pm-kern-endp-add_addr-new branch from c7dc293 to fc6e388 Compare October 9, 2025 16:17
#
# See the ip-mptcp(8) man page for details.
#
# addr-flags=subflow
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should not set subflow,laminar by default. Older kernel versions will accept that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should not set subflow,laminar by default. Older kernel versions will accept that.

(if yes, I'm not so sure how to "cleanly" change the default value :) )

@mjmartineau mjmartineau changed the title flags: add 'luminar' endpoints support flags: add 'laminar' endpoints support Oct 22, 2025
Copy link
Member Author

@matttbe matttbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ossama-othman thank you for the reviews!

Some new defines related to MPTCP_INFO and EV flags, and switch to
_BITUL().

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
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 'laminar' 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.

'laminar', like the idea of laminar flows: the different subflows don't
mix with each other on an endpoint, unlike the "turbulent" way traffic
is mixed by 'fullmesh'.

This new flag is then added to mptcpd as well.

Link: multipath-tcp/mptcp_net-next#503
Link: https://git.kernel.org/netdev/net-next/c/539f6b9de39e
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Endpoints are usually added with a flag: validate that.

Set a random one (the new 'subflow' one) instead of 0.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
This parameter was not validated before.

Use all possible flags (even if they are not individually checked).

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
@matttbe matttbe force-pushed the pm-kern-endp-add_addr-new branch from 4a58168 to 68c2614 Compare November 24, 2025 18:02
@matttbe
Copy link
Member Author

matttbe commented Nov 24, 2025

Thank you for the review! I had to rebase (conflicts in include/linux/mptcp_upstream.h because the same lines have been added in other // PR, nothing to worry).

The CI is still happy, I suggest merging then!

@matttbe matttbe merged commit 725aaff into multipath-tcp:main Nov 24, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants