summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2018-08-07 11:48:37 -0700
committerShentubot <shentubot@google.com>2018-08-07 11:49:57 -0700
commit7d3684aadf71255d3d8442ae1ed0b0f0048f95a3 (patch)
tree21c1108e906c2db055c9ab831eed866cd45dc1a4 /pkg/tcpip/transport/tcp
parenta38f41b4643520a3b2a078e73ec012ffd3f71f54 (diff)
Adds support to dump out cubic internal state.
PiperOrigin-RevId: 207754087 Change-Id: I83abce64348ea93f8692da81a881b364dae2158b
Diffstat (limited to 'pkg/tcpip/transport/tcp')
-rw-r--r--pkg/tcpip/transport/tcp/endpoint.go14
1 files changed, 14 insertions, 0 deletions
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
}