diff options
author | Tamir Duberstein <tamird@google.com> | 2021-09-27 14:09:13 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-27 14:12:00 -0700 |
commit | dc64617d5493ff8d94f424a5340cc8228fa46baf (patch) | |
tree | 19e162e6da517b805ef5c9e227b043276dce2350 /pkg | |
parent | 1fe0a6691ff5cb2e6b8955dc24819651cfe0c3af (diff) |
Implement S/R for Stats
PiperOrigin-RevId: 399276940
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/tcpip/transport/tcp/endpoint.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go index 407ab2664..7c8a11cfb 100644 --- a/pkg/tcpip/transport/tcp/endpoint.go +++ b/pkg/tcpip/transport/tcp/endpoint.go @@ -205,6 +205,8 @@ type SACKInfo struct { } // ReceiveErrors collect segment receive errors within transport layer. +// +// +stateify savable type ReceiveErrors struct { tcpip.ReceiveErrors @@ -234,6 +236,8 @@ type ReceiveErrors struct { } // SendErrors collect segment send errors within the transport layer. +// +// +stateify savable type SendErrors struct { tcpip.SendErrors @@ -257,6 +261,8 @@ type SendErrors struct { } // Stats holds statistics about the endpoint. +// +// +stateify savable type Stats struct { // SegmentsReceived is the number of TCP segments received that // the transport layer successfully parsed. @@ -612,8 +618,7 @@ type endpoint struct { gso stack.GSO - // TODO(b/142022063): Add ability to save and restore per endpoint stats. - stats Stats `state:"nosave"` + stats Stats // tcpLingerTimeout is the maximum amount of a time a socket // a socket stays in TIME_WAIT state before being marked |