diff options
author | Nayana Bidari <nybidari@google.com> | 2020-11-13 13:57:02 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-13 13:59:43 -0800 |
commit | 839dd97008bacf526c05afa542e67c94f8b399ea (patch) | |
tree | 2d04c1165b64ec649a02f011013e5cfc3ce81d51 /pkg/tcpip/transport/tcp/rack.go | |
parent | 6c0f53002a7f3a518befbe667d308c3d64cc9a59 (diff) |
RACK: Detect DSACK
Detect if the ACK is a duplicate and update in RACK.
PiperOrigin-RevId: 342332569
Diffstat (limited to 'pkg/tcpip/transport/tcp/rack.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/rack.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pkg/tcpip/transport/tcp/rack.go b/pkg/tcpip/transport/tcp/rack.go index d312b1b8b..e0a50a919 100644 --- a/pkg/tcpip/transport/tcp/rack.go +++ b/pkg/tcpip/transport/tcp/rack.go @@ -29,12 +29,12 @@ import ( // // +stateify savable type rackControl struct { + // dsackSeen indicates if the connection has seen a DSACK. + dsackSeen bool + // endSequence is the ending TCP sequence number of rackControl.seg. endSequence seqnum.Value - // dsack indicates if the connection has seen a DSACK. - dsack bool - // fack is the highest selectively or cumulatively acknowledged // sequence. fack seqnum.Value @@ -122,3 +122,8 @@ func (rc *rackControl) detectReorder(seg *segment) { rc.reorderSeen = true } } + +// setDSACKSeen updates rack control if duplicate SACK is seen by the connection. +func (rc *rackControl) setDSACKSeen() { + rc.dsackSeen = true +} |