]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ss: output TCP BBR diag information
authorNeal Cardwell <ncardwell@google.com>
Wed, 21 Sep 2016 02:43:44 +0000 (22:43 -0400)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 21 Sep 2016 23:29:35 +0000 (16:29 -0700)
commit2f0f9aef94129643133363b4503468cdccc481cc
treec49426f66820fc164ee1d16d77d0385e93302756
parent16c2a51dc403d82b0987f2e2e45075e4339afebd
ss: output TCP BBR diag information

Dump useful TCP BBR state information from a struct tcp_bbr_info that
was grabbed using the inet_diag API.

We tolerate info that is shorter or longer than expected, in case the
kernel is older or newer than the ss binary. We simply print the
minimum of what is expected from the kernel and what is provided from
the kernel. We use the same trick as that used for struct tcp_info:
when the info from the kernel is shorter than we hoped, we pad the end
with zeroes, and don't print fields if they are zero.

The BBR output looks like:
  bbr:(bw:1.2Mbps,mrtt:18.965,pacing_gain:2.88672,cwnd_gain:2.88672)

The motivation here is to be consistent with DCTCP, which looks like:
  dctcp(ce_state:23,alpha:23,ab_ecn:23,ab_tot:23)

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
misc/ss.c