mptcp: new endpoint type and info flags
Matthieu Baerts (NGI0)
maintainercover mptcp: new endpoint type and info flags
Here is a series for iproute2 I'm planning to send to netdev. If nobody has time to check them, I'm sure it is fine if I send them directly.
- Patch 1: add an entry in the MAINTAINERS file for MPTCP.
Note: There is usually one person and one ML per entry, but I can add more if preferred.
- Patch 2: fix two minor typos in the man page.
- Patch 3: add laminar endpoint support
- Patches 4-6: display missing attributes and flags in the 'monitor'.
---
Matthieu Baerts (NGI0) (6):
MAINTAINERS: add entry for mptcp
man: mptcp: fix minor typos
mptcp: add 'laminar' endpoint support
mptcp: monitor: add 'server side' info
mptcp: monitor: add 'deny join id0' info
mptcp: monitor: support 'server side' as a flag
MAINTAINERS | 7 +++++++ ip/ipmptcp.c | 20 +++++++++++++++++--- man/man8/ip-mptcp.8 | 17 +++++++++++++++-- misc/ss.c | 2 ++ 4 files changed, 41 insertions(+), 5 deletions(-)
---
base-commit: ca756f36a0c6d24ab60657f8d14312c17443e5f0
change-id: 20251022-laminar-a8f8719ff4f6
Best regards,
Signature · 1 line
Matthieu Baerts (NGI0) <[email protected]>
Matthieu Baerts (NGI0)
maintainerPATCH 1/6 MAINTAINERS: add entry for mptcp
Add Matthieu as main maintainer, but also the MPTCP Linux mailing list to reach more people interested by MPTCP when submitting patches on this subject.
--- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+)
MAINTAINERS +7 -0
@@ -42,6 +42,13 @@ devlink M: Jiri Pirko <[email protected]> F: devlink/* +Multipath TCP - mptcp +M: Matthieu Baerts <[email protected]> +L: [email protected] +F: ip/ipmptcp.c +F: man/man8/ip-mptcp.8 +K: mptcp + netkit M: Daniel Borkmann <[email protected]> M: Nikolay Aleksandrov <[email protected]>
Signature · 1 line
2.51.0
Matthieu Baerts (NGI0)
maintainerPATCH 2/6 man: mptcp: fix minor typos
In reply to Matthieu Baerts (NGI0)- 'signaled' -> 'signalled'
- 'a implicit' -> 'an implicit'
--- man/man8/ip-mptcp.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man/man8/ip-mptcp.8 +2 -2
@@ -156,7 +156,7 @@ ID. .TP .BR signal -The endpoint will be announced/signaled to each peer via an MPTCP ADD_ADDR +The endpoint will be announced/signalled to each peer via an MPTCP ADD_ADDR sub-option. Typically, a server would be responsible for this. Upon reception of an ADD_ADDR sub-option, the other peer, typically the client side, can try to create additional subflows, see
@@ -207,7 +207,7 @@ is then optional. .BR implicit In some scenarios, an MPTCP .BR subflow -can use a local address mapped by a implicit endpoint created by the +can use a local address mapped by an implicit endpoint created by the in-kernel path manager. Once set, the implicit flag cannot be removed, but other flags can be added to the endpoint. Implicit endpoints cannot be created from user-space.
Signature · 1 line
2.51.0
Matthieu Baerts (NGI0)
maintainerPATCH 3/6 mptcp: add 'laminar' endpoint support
In reply to Matthieu Baerts (NGI0)This new endpoint type has been recently added to the kernel in v6.18 [1]. It will be used to create new subflows from the associated address to additional addresses announced by the other peer. This will be done if allowed by the MPTCP limits, and if the associated address is not already being used by another subflow from the same MPTCP connection. Note that the fullmesh flag takes precedence over the laminar one.
The support of the new flag is easy: simply by adding it in the mptcp_addr_flag_names array.
The usage menu and the manual now references the new endpoint type. The new corresponding counter has also been added in ss.
--- ip/ipmptcp.c | 3 ++- man/man8/ip-mptcp.8 | 13 +++++++++++++ misc/ss.c | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-)
ip/ipmptcp.c +2 -1
@@ -32,7 +32,7 @@ static void usage(void)" ip mptcp limits show\n" " ip mptcp monitor\n" "FLAG-LIST := [ FLAG-LIST ] FLAG\n" -"FLAG := [ signal | subflow | backup | fullmesh ]\n" +"FLAG := [ signal | subflow | laminar | backup | fullmesh ]\n" "CHANGE-OPT := [ backup | nobackup | fullmesh | nofullmesh ]\n");exit (-1 );
@@ -59,6 +59,7 @@ static const struct { { "backup", MPTCP_PM_ADDR_FLAG_BACKUP }, { "fullmesh", MPTCP_PM_ADDR_FLAG_FULLMESH }, { "implicit", MPTCP_PM_ADDR_FLAG_IMPLICIT }, + { "laminar", MPTCP_PM_ADDR_FLAG_LAMINAR }, { "nobackup", MPTCP_PM_ADDR_FLAG_NONE }, { "nofullmesh", MPTCP_PM_ADDR_FLAG_NONE } };
man/man8/ip-mptcp.8 +13 -0
@@ -66,6 +66,8 @@ ip-mptcp \- MPTCP path manager configuration .RB "|" .B subflow .RB "|" +.B laminar +.RB "|" .B backup .RB "|" .B fullmesh
@@ -169,6 +171,17 @@ path manager will try to create an additional subflow using this endpoint as the source address after the MPTCP connection is established. A client would typically do this. +.TP +.BR laminar +The endpoint will be used to create new subflows from the associated address to +additional addresses announced by the other peer. This will be done if allowed +by the MPTCP limits, and if the associated address is not already being used by +another subflow from the same MPTCP connection. Note that the +.BR fullmesh +flag takes precedence over the +.BR laminar +one. + .TP .BR backup If this is a
misc/ss.c +2 -0
@@ -3308,6 +3308,8 @@ static void mptcp_stats_print(struct mptcp_info *s)out (" bytes_acked:%llu" , s->mptcpi_bytes_acked);if (s->mptcpi_subflows_total)out (" subflows_total:%u" , s->mptcpi_subflows_total); +if (s->mptcpi_endp_laminar_max) +out (" endp_laminar_max:%u" , s->mptcpi_endp_laminar_max);if (s->mptcpi_last_data_sent)out (" last_data_sent:%u" , s->mptcpi_last_data_sent);if (s->mptcpi_last_data_recv)
Signature · 1 line
2.51.0
Matthieu Baerts
maintainerRe: [PATCH iproute-mptcp 3/6] mptcp: add 'laminar' endpoint support
Hello,
Quoted 12 lines · On 12/11/2025 17:24, Matthieu Baerts (NGI0) wrote:
This new endpoint type has been recently added to the kernel in v6.18 [1]. It will be used to create new subflows from the associated address to additional addresses announced by the other peer. This will be done if allowed by the MPTCP limits, and if the associated address is not already being used by another subflow from the same MPTCP connection. Note that the fullmesh flag takes precedence over the laminar one.
The support of the new flag is easy: simply by adding it in the
mptcp_addr_flag_namesarray.The usage menu and the manual now references the new endpoint type. The new corresponding counter has also been added in ss.
(...)
Quoted 17 lines
man/man8/ip-mptcp.8 +2
-0@@ -66,6 +66,8 @@ ip-mptcp \- MPTCP path manager configuration .RB "|" .B subflow .RB "|" +.B laminar +.RB "|" .B backup .RB "|" .B fullmesh@@ -169,6 +171,17 @@ path manager will try to create an additional subflow using this endpoint as the source address after the MPTCP connection is established. A client would typically do this.
man/man8/ip-mptcp.8 path manager will try to create an additional subflow using this endpoint · line 183
Quoted 10 lines
man/man8/ip-mptcp.8 +10
-0+.TP +.BR laminar +The endpoint will be used to create new subflows from the associated address to +additional addresses announced by the other peer. This will be done if allowed +by the MPTCP limits, and if the associated address is not already being used by +another subflow from the same MPTCP connection. Note that the +.BR fullmesh +flag takes precedence over the +.BR laminar +one.
I suggest adding here:
Quoted 4 lines
.... Without any of these two flags, the path-manager will create new subflows to additional addresses announced by the other peer by selecting the source address from the routing tables, which is harder to configure if the announced address is not known in advance.
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Matthieu Baerts (NGI0)
maintainerPATCH 4/6 mptcp: monitor: add 'server side' info
In reply to Matthieu Baerts (NGI0)This info has been added a while ago in the kernel [1], but it was not displayed in 'ip monitor'.
Now, 'server_side' is displayed if the attribute is defined and set to true. It looks better to do that instead of showing server_side=0. Note that from v6.18 [2], this attribute is only defined if it is set to true.
--- ip/ipmptcp.c | 2 ++ 1 file changed, 2 insertions(+)
ip/ipmptcp.c +2 -0
@@ -536,6 +536,8 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl,printf (" reset_reason=%u" ,rta_getattr_u32 (tb[MPTCP_ATTR_RESET_REASON ]));if (tb[MPTCP_ATTR_RESET_FLAGS ])printf (" reset_flags=0x%x" ,rta_getattr_u32 (tb[MPTCP_ATTR_RESET_FLAGS ])); +if (tb[MPTCP_ATTR_SERVER_SIDE ] &&rta_getattr_u8 (tb[MPTCP_ATTR_SERVER_SIDE ])) +printf (" server_side" );puts ("" ); out:
Signature · 1 line
2.51.0
Matthieu Baerts (NGI0)
maintainerPATCH 5/6 mptcp: monitor: add 'deny join id0' info
In reply to Matthieu Baerts (NGI0)Until recently, the 'flags' attribute was not used. This has recently been changed with the introduction of the 'deny_join_id0' flag [1].
This flag is set when a connection is created and the other peer set the 'C' flag in the MP_CAPABLE packets [2]. This flag can be set to tell the other side that the peer will not accept extra subflows requests sent to its initial IP address and port: typically set by a server behind a legacy Layer 4 load balancer.
Now, when this flag is set, "deny_join_id0" will be printed instead of "flags=1". Unknown remaining flags will be printed in hexadecimal at the end, e.g. "flags=0x2".
--- ip/ipmptcp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
ip/ipmptcp.c +10 -2
@@ -477,6 +477,7 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl,const struct genlmsghdr *ghdr =NLMSG_DATA (n);struct rtattr *tb[MPTCP_ATTR_MAX +1 ];int len = n->nlmsg_len; +__u16 flags =0 ; len -=NLMSG_LENGTH (GENL_HDRLEN );if (len <0 )
@@ -526,8 +527,6 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl,printf (" backup=%u" ,rta_getattr_u8 (tb[MPTCP_ATTR_BACKUP ]));if (tb[MPTCP_ATTR_ERROR ])printf (" error=%u" ,rta_getattr_u8 (tb[MPTCP_ATTR_ERROR ])); -if (tb[MPTCP_ATTR_FLAGS ]) -printf (" flags=%x" ,rta_getattr_u16 (tb[MPTCP_ATTR_FLAGS ]));if (tb[MPTCP_ATTR_TIMEOUT ])printf (" timeout=%u" ,rta_getattr_u32 (tb[MPTCP_ATTR_TIMEOUT ]));if (tb[MPTCP_ATTR_IF_IDX ])
@@ -539,6 +538,15 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl,if (tb[MPTCP_ATTR_SERVER_SIDE ] &&rta_getattr_u8 (tb[MPTCP_ATTR_SERVER_SIDE ]))printf (" server_side" ); +if (tb[MPTCP_ATTR_FLAGS ]) + flags =rta_getattr_u16 (tb[MPTCP_ATTR_FLAGS ]); +if (flags &MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 ) { + flags &= ~MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 ; +printf (" deny_join_id0" ); + } +if (flags)/* remaining bits */ +printf (" flags=0x%x" , flags); +puts ("" ); out:fflush (stdout);
Signature · 1 line
2.51.0
Matthieu Baerts (NGI0)
maintainerPATCH 6/6 mptcp: monitor: support 'server side' as a flag
In reply to Matthieu Baerts (NGI0)In the v6.18 kernel, the 'server side' attribute has been deprecated [1] in favour of the 'server side' flag [2].
Support both: first checking the new flag, then the old attribute to continue supporting older kernels.
--- ip/ipmptcp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
ip/ipmptcp.c +5 -2
@@ -535,11 +535,14 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl,printf (" reset_reason=%u" ,rta_getattr_u32 (tb[MPTCP_ATTR_RESET_REASON ]));if (tb[MPTCP_ATTR_RESET_FLAGS ])printf (" reset_flags=0x%x" ,rta_getattr_u32 (tb[MPTCP_ATTR_RESET_FLAGS ])); -if (tb[MPTCP_ATTR_SERVER_SIDE ] &&rta_getattr_u8 (tb[MPTCP_ATTR_SERVER_SIDE ])) -printf (" server_side" );if (tb[MPTCP_ATTR_FLAGS ]) flags =rta_getattr_u16 (tb[MPTCP_ATTR_FLAGS ]); +if ((flags &MPTCP_PM_EV_FLAG_SERVER_SIDE ) || + (tb[MPTCP_ATTR_SERVER_SIDE ] &&rta_getattr_u8 (tb[MPTCP_ATTR_SERVER_SIDE ]))) { + flags &= ~MPTCP_PM_EV_FLAG_SERVER_SIDE ; +printf (" server_side" ); + }if (flags &MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 ) { flags &= ~MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 ;printf (" deny_join_id0" );
Signature · 1 line
2.51.0