MPTCP Archive mirror
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
	Stephen Hemminger <stephen@networkplumber.org>,
	Mat Martineau <martineau@kernel.org>,
	Geliang Tang <geliang@kernel.org>
Subject: Re: [PATCH iproute2-next] ss: mptcp: print out last time counters
Date: Tue, 16 Apr 2024 09:36:41 +0200	[thread overview]
Message-ID: <35c0e6dd-ad60-44e6-9f25-00362a5095c7@kernel.org> (raw)
In-Reply-To: <69e00bd0-a1d7-4021-ada9-9d344e0e84e4@gmail.com>

Hi David,

On 13/04/2024 18:45, David Ahern wrote:
> On 4/12/24 2:19 AM, Matthieu Baerts (NGI0) wrote:
>> From: Geliang Tang <geliang@kernel.org>
>>
>> Three new "last time" counters have been added to "struct mptcp_info":
>> last_data_sent, last_data_recv and last_ack_recv. They have been added
>> in commit 18d82cde7432 ("mptcp: add last time fields in mptcp_info") in
>> net-next recently.
>>
>> This patch prints out these new counters into mptcp_stats output in ss.
>>
>> Signed-off-by: Geliang Tang <geliang@kernel.org>
>> Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>> ---
>>  include/uapi/linux/mptcp.h | 4 ++++
>>  misc/ss.c                  | 6 ++++++
>>  2 files changed, 10 insertions(+)
>>
>> diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h
>> index c2e6f3be..a0da2632 100644
>> --- a/include/uapi/linux/mptcp.h
>> +++ b/include/uapi/linux/mptcp.h
> 
> uapi headers are synced using scripts, meaning at best uapi updates
> should be a separate patch (the updates can also be omitted).

Sorry for that, I didn't know. Thank you for the explanation, noted!

>> @@ -56,6 +56,10 @@ struct mptcp_info {
>>  	__u64	mptcpi_bytes_received;
>>  	__u64	mptcpi_bytes_acked;
>>  	__u8	mptcpi_subflows_total;
>> +	__u8	reserved[3];
>> +	__u32	mptcpi_last_data_sent;
>> +	__u32	mptcpi_last_data_recv;
>> +	__u32	mptcpi_last_ack_recv;
>>  };
>>  
>>  /* MPTCP Reset reason codes, rfc8684 */
>> diff --git a/misc/ss.c b/misc/ss.c
>> index 87008d7c..81b813c1 100644
>> --- a/misc/ss.c
>> +++ b/misc/ss.c
>> @@ -3279,6 +3279,12 @@ 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_last_data_sent)
>> +		out(" last_data_sent:%u", s->mptcpi_last_data_sent);
>> +	if (s->mptcpi_last_data_recv)
>> +		out(" last_data_recv:%u", s->mptcpi_last_data_recv);
>> +	if (s->mptcpi_last_ack_recv)
>> +		out(" last_ack_recv:%u", s->mptcpi_last_ack_recv);
>>  }
>>  
> 
> applied to iproute2-next
Thank you!

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2024-04-16  7:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12  8:19 [PATCH iproute2-next] ss: mptcp: print out last time counters Matthieu Baerts (NGI0)
2024-04-13 16:45 ` David Ahern
2024-04-16  7:36   ` Matthieu Baerts [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-29  9:42 Geliang Tang
2024-03-29 15:01 ` Matthieu Baerts
2024-04-11 17:33   ` Matthieu Baerts
2024-04-12  3:37     ` Geliang Tang

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=35c0e6dd-ad60-44e6-9f25-00362a5095c7@kernel.org \
    --to=matttbe@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=geliang@kernel.org \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).