mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-27 03:55:36 +00:00
7bc2ddaedc
This commit implements TCP GSO for packets being read from gVisor on
Linux. Windows support will follow later. The wireguard-go dependency is
updated in order to make use of newly exported GSO logic from its tun
package.
A new gVisor stack.LinkEndpoint implementation has been established
(linkEndpoint) that is loosely modeled after its predecessor
(channel.Endpoint). This new implementation supports GSO of monster TCP
segments up to 64K in size, whereas channel.Endpoint only supports up to
32K. linkEndpoint will also be required for GRO, which will be
implemented in a follow-on commit.
TCP throughput from gVisor, i.e. TUN read direction, is dramatically
improved as a result of this commit. Benchmarks show substantial
improvement through a wide range of RTT and loss conditions, sometimes
as high as 5x.
The iperf3 results below demonstrate the effect of this commit between
two Linux computers with i5-12400 CPUs. There is roughly ~13us of round
trip latency between them.
The first result is from commit
|
||
---|---|---|
.. | ||
fake.go | ||
ifstatus_noop.go | ||
ifstatus_windows.go | ||
linkattrs_linux.go | ||
linkattrs_notlinux.go | ||
mtu_test.go | ||
mtu.go | ||
tap_linux.go | ||
tap_unsupported.go | ||
tstun_stub.go | ||
tun_features_linux.go | ||
tun_features_notlinux.go | ||
tun_linux.go | ||
tun_macos.go | ||
tun_notwindows.go | ||
tun_windows.go | ||
tun.go | ||
wrap_test.go | ||
wrap.go |