From 7d3684aadf71255d3d8442ae1ed0b0f0048f95a3 Mon Sep 17 00:00:00 2001 From: Bhasker Hariharan Date: Tue, 7 Aug 2018 11:48:37 -0700 Subject: Adds support to dump out cubic internal state. PiperOrigin-RevId: 207754087 Change-Id: I83abce64348ea93f8692da81a881b364dae2158b --- pkg/tcpip/transport/tcp/endpoint.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pkg/tcpip/transport/tcp') diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go index e1b71e423..3fcbf6502 100644 --- a/pkg/tcpip/transport/tcp/endpoint.go +++ b/pkg/tcpip/transport/tcp/endpoint.go @@ -1452,5 +1452,19 @@ func (e *endpoint) completeState() stack.TCPEndpointState { SndWndScale: e.snd.sndWndScale, MaxSentAck: e.snd.maxSentAck, } + + if cubic, ok := e.snd.cc.(*cubicState); ok { + s.Sender.Cubic = stack.TCPCubicState{ + WMax: cubic.wMax, + WLastMax: cubic.wLastMax, + T: cubic.t, + TimeSinceLastCongestion: time.Since(cubic.t), + C: cubic.c, + K: cubic.k, + Beta: cubic.beta, + WC: cubic.wC, + WEst: cubic.wEst, + } + } return s } -- cgit v1.2.3