public inbox for netdev@vger.kernel.org
 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>,
	 Kuniyuki Iwashima <kuniyu@google.com>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com,
	 Eric Dumazet <edumazet@google.com>
Subject: [PATCH iproute2-next] ss: add support for TCP delack timers
Date: Fri,  3 Apr 2026 10:23:09 +0000	[thread overview]
Message-ID: <20260403102309.338648-1-edumazet@google.com> (raw)

Kernel commit c698f5cc940d ("inet_diag: report delayed ack timer information")
added a new enum for idiag_timer values and support for delayed ack timers.

Change tcp_timer_print() to use the new enum and display "delack"
instead of "unknown":

tt -to
...
   ESTAB 10     0   [2002:a05:6830:1f86::]:12875 [2002:a05:6830:1f85::]:50438

        timer:(delack,003ms,0) ino:152178 sk:3004 cgroup:unreachable:189 <->

        skmem:(r1344,rb12780520,t0,tb262144,f2752,w0,o250,bl0,d0) ts usec_ts
        ...

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

diff --git a/misc/ss.c b/misc/ss.c
index b3566f6b6b81427609829720496e80bea7cfeef7..1ea804ad549e23f767633e07efdd9adf1277af18 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -2765,21 +2765,23 @@ static void tcp_stats_print(struct tcpstat *s)
 static void tcp_timer_print(struct tcpstat *s)
 {
 	static const char * const tmr_name[] = {
-		"off",
-		"on",
-		"keepalive",
-		"timewait",
-		"persist",
-		"unknown"
+		[IDIAG_TIMER_OFF]	= "off",
+		[IDIAG_TIMER_ON]	= "on",
+		[IDIAG_TIMER_KEEPALIVE]	= "keepalive",
+		[IDIAG_TIMER_TIMEWAIT]	= "timewait",
+		[IDIAG_TIMER_PROBE0]	= "persist",
+		[IDIAG_TIMER_DELACK]	= "delack",
 	};
 
 	if (s->timer) {
-		if (s->timer > 4)
-			s->timer = 5;
-		out(" timer:(%s,%s,%d)",
-			     tmr_name[s->timer],
-			     print_ms_timer(s->timeout),
-			     s->retrans);
+		const char *name;
+
+		if (s->timer >= ARRAY_SIZE(tmr_name))
+			name = "unknown";
+		else
+			name = tmr_name[s->timer];
+		out(" timer:(%s,%s,%d)", name,
+		    print_ms_timer(s->timeout), s->retrans);
 	}
 }
 
-- 
2.53.0.1213.gd9a14994de-goog


             reply	other threads:[~2026-04-03 10:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03 10:23 Eric Dumazet [this message]
2026-04-03 14:14 ` [PATCH iproute2-next] ss: add support for TCP delack timers Neal Cardwell
2026-04-05 16:30 ` 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=20260403102309.338648-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=kuniyu@google.com \
    --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