diff options
author | Bhasker Hariharan <bhaskerh@google.com> | 2019-02-25 15:18:55 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-02-25 15:20:04 -0800 |
commit | 26be25e4ecec2fa66ee819e980de353d657aa1f6 (patch) | |
tree | 957e785875d1198c5c42f22adbbfbe85c18942de /pkg/tcpip/transport/tcp/endpoint.go | |
parent | 41167e6c508240a127f96bfa519b909c16ee0933 (diff) |
Add a SACK scoreboard to TCP endpoints.
This change does not make use of SACK information but adds support to track
SACK information and store it in the endpoint.
The actual SACK based recovery will be in a separate CL.
Part of commits to add RFC 6675 support to Netstack.
PiperOrigin-RevId: 235612264
Change-Id: I261f94844d7bad5abda803152ce6cc6125a467ff
Diffstat (limited to 'pkg/tcpip/transport/tcp/endpoint.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/endpoint.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go index aa31a78af..a8618bb4a 100644 --- a/pkg/tcpip/transport/tcp/endpoint.go +++ b/pkg/tcpip/transport/tcp/endpoint.go @@ -178,6 +178,9 @@ type endpoint struct { // cork is a boolean (0 is false) and must be accessed atomically. cork uint32 + // scoreboard holds TCP SACK Scoreboard information for this endpoint. + scoreboard *SACKScoreboard + // The options below aren't implemented, but we remember the user // settings because applications expect to be able to set/query these // options. @@ -1627,6 +1630,7 @@ func (e *endpoint) completeState() stack.TCPEndpointState { s.SACKPermitted = e.sackPermitted s.SACK.Blocks = make([]header.SACKBlock, e.sack.NumBlocks) copy(s.SACK.Blocks, e.sack.Blocks[:e.sack.NumBlocks]) + s.SACK.ReceivedBlocks, s.SACK.MaxSACKED = e.scoreboard.Copy() // Copy endpoint send state. e.sndBufMu.Lock() |