mptcp: track some aggregate data counters
authorPaolo Abeni <pabeni@redhat.com>
Tue, 20 Jun 2023 16:30:15 +0000 (18:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Jun 2023 05:45:57 +0000 (22:45 -0700)
commit38967f424b5be79c4c676712e5640d846efd07e3
treed7cc294876f5615b9d165ee05b850f1d1ec6f1b4
parentc026d33b8f5081969503e322ea30d7c1a6b17dda
mptcp: track some aggregate data counters

Currently there are no data transfer counters accounting for all
the subflows used by a given MPTCP socket. The user-space can compute
such figures aggregating the subflow info, but that is inaccurate
if any subflow is closed before the MPTCP socket itself.

Add the new counters in the MPTCP socket itself and expose them
via the existing diag and sockopt. While touching mptcp_diag_fill_info(),
acquire the relevant locks before fetching the msk data, to ensure
better data consistency

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/385
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>
include/uapi/linux/mptcp.h
net/mptcp/options.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/sockopt.c