def run_one_stream(cfg, ipver, remote_v4, remote_v6, should_lso):
cfg.require_cmd("socat", local=False, remote=True)
+ # Set recv window clamp to avoid overwhelming receiver on debug kernels
+ # the 200k clamp should still let use reach > 15Gbps on real HW
port = rand_port()
- listen_cmd = f"socat -{ipver} -t 2 -u TCP-LISTEN:{port},reuseport /dev/null,ignoreeof"
+ listen_opts = f"{port},reuseport,tcp-window-clamp=200000"
+ listen_cmd = f"socat -{ipver} -t 2 -u TCP-LISTEN:{listen_opts} /dev/null,ignoreeof"
with bkg(listen_cmd, host=cfg.remote, exit_wait=True) as nc:
wait_port_listen(port, host=cfg.remote)
# Make sure we have order of magnitude more LSO packets than
# retransmits, in case TCP retransmitted all the LSO packets.
- ksft_lt(tcp_sock_get_retrans(sock), total_lso_wire / 4)
+ ksft_lt(tcp_sock_get_retrans(sock), total_lso_wire / 16)
sock.close()
if should_lso: