diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/benchmarks/tcp/tcp_benchmark.sh | 6 | ||||
-rw-r--r-- | test/benchmarks/tcp/tcp_proxy.go | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/test/benchmarks/tcp/tcp_benchmark.sh b/test/benchmarks/tcp/tcp_benchmark.sh index ef04b4ace..6a4f33b96 100755 --- a/test/benchmarks/tcp/tcp_benchmark.sh +++ b/test/benchmarks/tcp/tcp_benchmark.sh @@ -91,6 +91,9 @@ while [ $# -gt 0 ]; do --sack) netstack_opts="${netstack_opts} -sack" ;; + --rack) + netstack_opts="${netstack_opts} -rack" + ;; --cubic) netstack_opts="${netstack_opts} -cubic" ;; @@ -150,8 +153,9 @@ while [ $# -gt 0 ]; do echo " --client use netstack as the client" echo " --ideal reset all network emulation" echo " --server use netstack as the server" - echo " --mtu set the mtu (bytes)" + echo " --mtu set the mtu (bytes)" echo " --sack enable SACK support" + echo " --rack enable RACK support" echo " --moderate-recv-buf enable TCP receive buffer auto-tuning" echo " --cubic enable CUBIC congestion control for Netstack" echo " --duration set the test duration (s)" 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) |