diff options
author | Bhasker Hariharan <bhaskerh@google.com> | 2018-08-07 11:48:37 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-07 11:49:57 -0700 |
commit | 7d3684aadf71255d3d8442ae1ed0b0f0048f95a3 (patch) | |
tree | 21c1108e906c2db055c9ab831eed866cd45dc1a4 /pkg/tcpip/stack | |
parent | a38f41b4643520a3b2a078e73ec012ffd3f71f54 (diff) |
Adds support to dump out cubic internal state.
PiperOrigin-RevId: 207754087
Change-Id: I83abce64348ea93f8692da81a881b364dae2158b
Diffstat (limited to 'pkg/tcpip/stack')
-rw-r--r-- | pkg/tcpip/stack/stack.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/stack.go b/pkg/tcpip/stack/stack.go index 9cdc7b6d8..fa7aeb051 100644 --- a/pkg/tcpip/stack/stack.go +++ b/pkg/tcpip/stack/stack.go @@ -56,6 +56,20 @@ type transportProtocolState struct { // passed to stack.AddTCPProbe. type TCPProbeFunc func(s TCPEndpointState) +// TCPCubicState is used to hold a copy of the internal cubic state when the +// TCPProbeFunc is invoked. +type TCPCubicState struct { + WLastMax float64 + WMax float64 + T time.Time + TimeSinceLastCongestion time.Duration + C float64 + K float64 + Beta float64 + WC float64 + WEst float64 +} + // TCPEndpointID is the unique 4 tuple that identifies a given endpoint. type TCPEndpointID struct { // LocalPort is the local port associated with the endpoint. @@ -180,6 +194,9 @@ type TCPSenderState struct { // FastRecovery holds the fast recovery state for the endpoint. FastRecovery TCPFastRecoveryState + + // Cubic holds the state related to CUBIC congestion control. + Cubic TCPCubicState } // TCPSACKInfo holds TCP SACK related information for a given TCP endpoint. |