From: Eric Dumazet Date: Mon, 4 Dec 2023 09:19:08 +0000 (+0000) Subject: ss: add report of TCPI_OPT_USEC_TS X-Git-Tag: v6.8.0~58^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=467879b418ff73d7afc60fab85c8cc766aca7553;p=thirdparty%2Fiproute2.git ss: add report of TCPI_OPT_USEC_TS linux-6.7 supports usec resolution in TCP TS values. ss -ie can show if a flow is using this new resolution. $ ss -tie ... State Recv-Q Send-Q Local Address:Port Peer Address:Port Process ESTAB 0 12869632 [2002:a05:6608:295::]:37054 [2002:a05:6608:297::]:35721 ts usec_ts sack bbr2s wscale:12,12 ... Signed-off-by: Eric Dumazet Signed-off-by: David Ahern --- diff --git a/misc/ss.c b/misc/ss.c index 9438382b8..3dacee48d 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -875,6 +875,7 @@ struct tcpstat { unsigned long long bytes_sent; unsigned long long bytes_retrans; bool has_ts_opt; + bool has_usec_ts_opt; bool has_sack_opt; bool has_ecn_opt; bool has_ecnseen_opt; @@ -2562,6 +2563,8 @@ static void tcp_stats_print(struct tcpstat *s) if (s->has_ts_opt) out(" ts"); + if (s->has_usec_ts_opt) + out(" usec_ts"); if (s->has_sack_opt) out(" sack"); if (s->has_ecn_opt) @@ -3037,6 +3040,7 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r, if (show_options) { s.has_ts_opt = TCPI_HAS_OPT(info, TCPI_OPT_TIMESTAMPS); + s.has_usec_ts_opt = TCPI_HAS_OPT(info, TCPI_OPT_USEC_TS); s.has_sack_opt = TCPI_HAS_OPT(info, TCPI_OPT_SACK); s.has_ecn_opt = TCPI_HAS_OPT(info, TCPI_OPT_ECN); s.has_ecnseen_opt = TCPI_HAS_OPT(info, TCPI_OPT_ECN_SEEN);