summaryrefslogtreecommitdiff
path: root/net/mptcp/protocol.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2023-06-20 19:30:17 +0300
committerJakub Kicinski <kuba@kernel.org>2023-06-22 08:45:57 +0300
commit6f06b4d4d1cc676a3f9d947f931ec3866b6c4f6c (patch)
treef1161c9ff3e94371b542f929e70b61d23350dc74 /net/mptcp/protocol.h
parent5dcff89e14555a4ee6cfa132b82f7d13dcb1e80a (diff)
downloadlinux-6f06b4d4d1cc676a3f9d947f931ec3866b6c4f6c.tar.xz
mptcp: add subflow unique id
The user-space need to properly account the data received/sent by individual subflows. When additional subflows are created and/or closed during the MPTCP socket lifetime, the information currently exposed via MPTCP_TCPINFO are not enough: subflows are identified only by the sequential position inside the info dumps, and that will change with the above mentioned events. To solve the above problem, this patch introduces a new subflow identifier that is unique inside the given MPTCP socket scope. The initial subflow get the id 1 and the other subflows get incremental values at join time. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/388 Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/protocol.h')
-rw-r--r--net/mptcp/protocol.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 27adfcc5aaa2..bb4cacd92778 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -323,7 +323,8 @@ struct mptcp_sock {
u64 rtt_us; /* last maximum rtt of subflows */
} rcvq_space;
- u32 setsockopt_seq;
+ u32 subflow_id;
+ u32 setsockopt_seq;
char ca_name[TCP_CA_NAME_MAX];
struct mptcp_sock *dl_next;
};
@@ -504,6 +505,8 @@ struct mptcp_subflow_context {
u8 reset_reason:4;
u8 stale_count;
+ u32 subflow_id;
+
long delegated_status;
unsigned long fail_tout;