Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: David Ahern <dsahern@kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>,
	Neal Cardwell <ncardwell@google.com>,
	netdev@vger.kernel.org,  eric.dumazet@gmail.com,
	Eric Dumazet <edumazet@google.com>
Subject: [PATCH iproute2] ss: add support for rcv_wnd and rehash
Date: Tue, 31 Oct 2023 11:17:20 +0000	[thread overview]
Message-ID: <20231031111720.2871511-1-edumazet@google.com> (raw)

tcpi_rcv_wnd and tcpi_rehash were added in linux-6.2.

$ ss -ti
...
 cubic wscale:7,7 ... minrtt:0.01 snd_wnd:65536 rcv_wnd:458496

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 misc/ss.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/misc/ss.c b/misc/ss.c
index 2628c2e042f1cdb616ec8aa80d4f413b41dfd3f4..9438382b8e667529dc2cf4b020d8696a4175e992 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -865,6 +865,8 @@ struct tcpstat {
 	double		    min_rtt;
 	unsigned int 	    rcv_ooopack;
 	unsigned int	    snd_wnd;
+	unsigned int	    rcv_wnd;
+	unsigned int	    rehash;
 	int		    rcv_space;
 	unsigned int        rcv_ssthresh;
 	unsigned long long  busy_time;
@@ -2711,6 +2713,10 @@ static void tcp_stats_print(struct tcpstat *s)
 		out(" rcv_ooopack:%u", s->rcv_ooopack);
 	if (s->snd_wnd)
 		out(" snd_wnd:%u", s->snd_wnd);
+	if (s->rcv_wnd)
+		out(" rcv_wnd:%u", s->rcv_wnd);
+	if (s->rehash)
+		out(" rehash:%u", s->rehash);
 }
 
 static void tcp_timer_print(struct tcpstat *s)
@@ -3147,6 +3153,8 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
 		s.bytes_retrans = info->tcpi_bytes_retrans;
 		s.rcv_ooopack = info->tcpi_rcv_ooopack;
 		s.snd_wnd = info->tcpi_snd_wnd;
+		s.rcv_wnd = info->tcpi_rcv_wnd;
+		s.rehash = info->tcpi_rehash;
 		tcp_stats_print(&s);
 		free(s.dctcp);
 		free(s.bbr_info);
-- 
2.42.0.820.g83a721a137-goog


             reply	other threads:[~2023-10-31 11:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 11:17 Eric Dumazet [this message]
2023-10-31 12:08 ` [PATCH iproute2] ss: add support for rcv_wnd and rehash Neal Cardwell
2023-11-04  1:10 ` patchwork-bot+netdevbpf

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=20231031111720.2871511-1-edumazet@google.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --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