]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ss: output dctcp diag information
authorDaniel Borkmann <dborkman@redhat.com>
Mon, 29 Sep 2014 08:47:32 +0000 (10:47 +0200)
committerStephen Hemminger <shemming@brocade.com>
Thu, 30 Oct 2014 05:37:45 +0000 (22:37 -0700)
Dump useful DCTCP state/debug information gathered from diag.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
misc/ss.c

index 2420b51dd4c444392f02d3ea6611015d72eaad0a..d3c4fa6597ba62d9a106a56fcc4b753e49f37b75 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1578,6 +1578,19 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
                                rtt =  vinfo->tcpv_rtt;
                }
 
+               if (tb[INET_DIAG_DCTCPINFO]) {
+                       const struct tcp_dctcp_info *dinfo
+                               = RTA_DATA(tb[INET_DIAG_DCTCPINFO]);
+
+                       if (dinfo->dctcp_enabled) {
+                               printf(" ce_state %u alpha %u ab_ecn %u ab_tot %u",
+                                      dinfo->dctcp_ce_state, dinfo->dctcp_alpha,
+                                      dinfo->dctcp_ab_ecn, dinfo->dctcp_ab_tot);
+                       } else {
+                               printf(" fallback_mode");
+                       }
+               }
+
                if (rtt > 0 && info->tcpi_snd_mss && info->tcpi_snd_cwnd) {
                        printf(" send %sbps",
                               sprint_bw(b1, (double) info->tcpi_snd_cwnd *