diff options
Diffstat (limited to 'test/benchmarks/tcp/tcp_proxy.go')
-rw-r--r-- | test/benchmarks/tcp/tcp_proxy.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/benchmarks/tcp/tcp_proxy.go b/test/benchmarks/tcp/tcp_proxy.go index 9fe60080c..780e4f7ae 100644 --- a/test/benchmarks/tcp/tcp_proxy.go +++ b/test/benchmarks/tcp/tcp_proxy.go @@ -56,6 +56,7 @@ var ( mask = flag.Int("mask", 8, "mask size for address") iface = flag.String("iface", "", "network interface name to bind for netstack") sack = flag.Bool("sack", false, "enable SACK support for netstack") + rack = flag.Bool("rack", false, "enable RACK in TCP") moderateRecvBuf = flag.Bool("moderate_recv_buf", false, "enable TCP Receive Buffer Auto-tuning") cubic = flag.Bool("cubic", false, "enable use of CUBIC congestion control for netstack") gso = flag.Int("gso", 0, "GSO maximum size") @@ -232,6 +233,13 @@ func newNetstackImpl(mode string) (impl, error) { } } + if *rack { + opt := tcpip.TCPRecovery(tcpip.TCPRACKLossDetection) + if err := s.SetTransportProtocolOption(tcp.ProtocolNumber, &opt); err != nil { + return nil, fmt.Errorf("enabling RACK failed: %v", err) + } + } + // Enable Receive Buffer Auto-Tuning. { opt := tcpip.TCPModerateReceiveBufferOption(*moderateRecvBuf) |