Merge branch 'mptcp-new-endpoint' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
David Ahern 2025-12-01 19:28:50 -07:00
commit e570876032
4 changed files with 44 additions and 5 deletions

View File

@ -47,6 +47,13 @@ M: Petr Oros <poros@redhat.com>
M: Ivan Vecera <ivecera@redhat.com>
F: dpll/*
Multipath TCP - mptcp
M: Matthieu Baerts <matttbe@kernel.org>
L: mptcp@lists.linux.dev
F: ip/ipmptcp.c
F: man/man8/ip-mptcp.8
K: mptcp
netkit
M: Daniel Borkmann <daniel@iogearbox.net>
M: Nikolay Aleksandrov <razor@blackwall.org>

View File

@ -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 }
};
@ -476,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)
@ -525,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])
@ -536,6 +536,20 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl,
if (tb[MPTCP_ATTR_RESET_FLAGS])
printf(" reset_flags=0x%x", rta_getattr_u32(tb[MPTCP_ATTR_RESET_FLAGS]));
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");
}
if (flags) /* remaining bits */
printf(" flags=0x%x", flags);
puts("");
out:
fflush(stdout);

View File

@ -66,6 +66,8 @@ ip-mptcp \- MPTCP path manager configuration
.RB "|"
.B subflow
.RB "|"
.B laminar
.RB "|"
.B backup
.RB "|"
.B fullmesh
@ -156,7 +158,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
@ -169,6 +171,20 @@ 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. 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.
.TP
.BR backup
If this is a
@ -207,7 +223,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.

View File

@ -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)