MPTCP Linux Development
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Paolo Abeni <pabeni@redhat.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH v3 mptcp-next 4/6] mptcp: track some aggregate data counters.
Date: Tue, 23 May 2023 20:49:11 +0200	[thread overview]
Message-ID: <20230523184911.GC17561@breakpoint.cc> (raw)
In-Reply-To: <6c8b8ab79ee6526dff0cd3240e35e2e82c300a5d.1684863309.git.pabeni@redhat.com>

Paolo Abeni <pabeni@redhat.com> wrote:
> 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
> 
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
>  include/uapi/linux/mptcp.h |  5 +++++
>  net/mptcp/options.c        | 10 ++++++++--
>  net/mptcp/protocol.c       | 12 +++++++++++-
>  net/mptcp/protocol.h       |  4 ++++
>  net/mptcp/sockopt.c        | 22 +++++++++++++++++-----
>  5 files changed, 45 insertions(+), 8 deletions(-)
> 
> diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h
> index f4f42d88e58b..ac469625affd 100644
> --- a/include/uapi/linux/mptcp.h
> +++ b/include/uapi/linux/mptcp.h
> @@ -124,6 +124,11 @@ struct mptcp_info {
>  	__u8	mptcpi_local_addr_used;
>  	__u8	mptcpi_local_addr_max;
>  	__u8	mptcpi_csum_enabled;
> +	__u32	mptcpi_retransmits;
> +	__u64	mptcpi_bytes_retrans;
> +	__u64	mptcpi_bytes_sent;
> +	__u64	mptcpi_bytes_received;
> +	__u64	mptcpi_bytes_acked;

__aligned_u64 is preferred for uapi.

  reply	other threads:[~2023-05-23 18:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23 17:37 [PATCH v3 mptcp-next 0/6] mptcp: add some more diag info Paolo Abeni
2023-05-23 17:37 ` [PATCH v3 mptcp-next 1/6] mptcp: add subflow unique id Paolo Abeni
2023-05-23 17:37 ` [PATCH v3 mptcp-next 2/6] mptcp: introduce MPTCP_FULL_INFO getsockopt Paolo Abeni
2023-05-23 18:25   ` Florian Westphal
2023-05-24  6:34     ` Paolo Abeni
2023-05-24  6:36       ` Paolo Abeni
2023-05-24  7:36         ` Matthieu Baerts
2023-05-24  8:11           ` Paolo Abeni
2023-05-24  8:16             ` Matthieu Baerts
2023-05-24  9:56       ` Florian Westphal
2023-05-24 12:04         ` Matthieu Baerts
2023-05-24 12:22           ` Florian Westphal
2023-05-24 12:37             ` Matthieu Baerts
2023-05-24  8:13     ` Matthieu Baerts
2023-05-24  8:53       ` Paolo Abeni
2023-05-24  9:12         ` Matthieu Baerts
2023-05-24 10:04       ` Florian Westphal
2023-05-24 12:08         ` Matthieu Baerts
2023-05-23 17:37 ` [PATCH v3 mptcp-next 3/6] mptcp: move snd_una update earlier for fallback socket Paolo Abeni
2023-05-23 17:37 ` [PATCH v3 mptcp-next 4/6] mptcp: track some aggregate data counters Paolo Abeni
2023-05-23 18:49   ` Florian Westphal [this message]
2023-05-24  8:15     ` Paolo Abeni
2023-05-24 10:05       ` Florian Westphal
2023-05-23 17:37 ` [PATCH v3 mptcp-next 5/6] selftests: mptcp: explicitly tests aggregate counters Paolo Abeni
2023-05-23 17:37 ` [PATCH v3 mptcp-next 6/6] selftests: mptcp: add MPTCP_FULL_INFO testcase Paolo Abeni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230523184911.GC17561@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox