From 9f11a5b37580f1f6cdeabda71c38fd984a13eb91 Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Wed, 15 May 2024 11:47:38 -0700 Subject: [PATCH] netstack: enable SACK by default There's no reason not to turn this on. Leaving it off makes it possible for users to miss it. PiperOrigin-RevId: 634026749 --- pkg/tcpip/tests/integration/istio_test.go | 2 +- pkg/tcpip/transport/tcp/protocol.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/tcpip/tests/integration/istio_test.go b/pkg/tcpip/tests/integration/istio_test.go index 5931a0a2d..fe330a1b4 100644 --- a/pkg/tcpip/tests/integration/istio_test.go +++ b/pkg/tcpip/tests/integration/istio_test.go @@ -113,7 +113,7 @@ var ( func newTestContext(t *testing.T) *testContext { t.Helper() - localNIC, remoteNIC := pipe.New("" /* linkAddr1 */, "" /* linkAddr2 */, header.IPv4MinimumMTU) + localNIC, remoteNIC := pipe.New("" /* linkAddr1 */, "" /* linkAddr2 */, 1500) localStack := stack.New(stack.Options{ NetworkProtocols: []stack.NetworkProtocolFactory{ipv4.NewProtocol}, diff --git a/pkg/tcpip/transport/tcp/protocol.go b/pkg/tcpip/transport/tcp/protocol.go index 8d53a9e82..2d07cc6af 100644 --- a/pkg/tcpip/transport/tcp/protocol.go +++ b/pkg/tcpip/transport/tcp/protocol.go @@ -535,6 +535,7 @@ func NewProtocol(s *stack.Stack) stack.TransportProtocol { Default: DefaultReceiveBufferSize, Max: MaxBufferSize, }, + sackEnabled: true, congestionControl: ccReno, availableCongestionControl: []string{ccReno, ccCubic}, moderateReceiveBuffer: true,