summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/tcp.go
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2021-08-12 00:48:50 -0700
committergVisor bot <gvisor-bot@google.com>2021-08-12 00:51:35 -0700
commit96459f55984f655641aa17f7eaac829a170b506a (patch)
tree8497ba8ed04cb7faa989c0b9599c6b29330ae877 /pkg/tcpip/stack/tcp.go
parent01cfe5952883524b185f60f60485dbc25f988cad (diff)
Add support for TCP send buffer auto tuning.
Send buffer size in TCP indicates the amount of bytes available for the sender to transmit. This change will allow TCP to update the send buffer size when - TCP enters established state. - ACK is received. The auto tuning is disabled when the send buffer size is set with the SO_SNDBUF option. PiperOrigin-RevId: 390312274
Diffstat (limited to 'pkg/tcpip/stack/tcp.go')
-rw-r--r--pkg/tcpip/stack/tcp.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/tcp.go b/pkg/tcpip/stack/tcp.go
index 90a8ba6cf..93ea83cdc 100644
--- a/pkg/tcpip/stack/tcp.go
+++ b/pkg/tcpip/stack/tcp.go
@@ -386,6 +386,12 @@ type TCPSndBufState struct {
// SndMTU is the smallest MTU seen in the control packets received.
SndMTU int
+
+ // AutoTuneSndBufDisabled indicates that the auto tuning of send buffer
+ // is disabled.
+ //
+ // Must be accessed using atomic operations.
+ AutoTuneSndBufDisabled uint32
}
// TCPEndpointStateInner contains the members of TCPEndpointState used directly