tailscale/net
Jordan Whited f0230ce0b5
go.mod,net/tstun,wgengine/netstack: implement gVisor TCP GRO for Linux (#12921)
This commit implements TCP GRO for packets being written to gVisor on
Linux. Windows support will follow later. The wireguard-go dependency is
updated in order to make use of newly exported IP checksum functions.
gVisor is updated in order to make use of newly exported
stack.PacketBuffer GRO logic.

TCP throughput towards gVisor, i.e. TUN write direction, is dramatically
improved as a result of this commit. Benchmarks show substantial
improvement, sometimes as high as 2x. High bandwidth-delay product
paths remain receive window limited, bottlenecked by gVisor's default
TCP receive socket buffer size. This will be addressed in a  follow-on
commit.

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 57856fc without TCP GRO.

Starting Test: protocol: TCP, 1 streams, 131072 byte blocks
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  4.77 GBytes  4.10 Gbits/sec   20 sender
[  5]   0.00-10.00  sec  4.77 GBytes  4.10 Gbits/sec      receiver

The second result is from this commit with TCP GRO.

Starting Test: protocol: TCP, 1 streams, 131072 byte blocks
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  10.6 GBytes  9.14 Gbits/sec   20 sender
[  5]   0.00-10.00  sec  10.6 GBytes  9.14 Gbits/sec      receiver

Updates #6816

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2024-08-02 10:41:10 -07:00
..
art all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
captivedetection net/captivedetection: call SetHealthy once connectivity restored (#12974) 2024-07-30 13:39:25 -07:00
connstats all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
dns net/dns, cmd/tailscaled: plumb system health tracker into dns cleanup (#12969) 2024-07-30 12:54:03 -04:00
dnscache net/dnscache: use parent context to perform lookup 2024-06-12 11:21:02 -07:00
dnsfallback net/dnsfallback: set CanPort80 in static DERPMap (#12929) 2024-07-26 13:04:12 -07:00
flowtrack net/flowtrack: fix, test String method 2024-06-18 21:44:44 -07:00
ipset go.mod: bump bart 2024-07-08 19:10:44 -07:00
ktimeout net/ktimeout: add a package to set TCP user timeout 2024-02-20 10:49:58 -08:00
memnet net/memnet: export the network name (#9111) 2023-08-28 11:43:51 -07:00
netaddr all: update copyright and license headers 2023-01-27 15:36:29 -08:00
netcheck health: introduce captive-portal-detected Warnable (#12707) 2024-07-26 11:25:55 -07:00
neterror net/neterror, wgengine/magicsock: use UDP GSO and GRO on Linux (#7791) 2023-04-04 16:32:16 -07:00
netkernelconf ipn/{ipnlocal,localapi},net/netkernelconf,client/tailscale,cmd/containerboot: optionally enable UDP GRO forwarding for containers (#12410) 2024-06-10 19:19:03 +01:00
netknob all: update copyright and license headers 2023-01-27 15:36:29 -08:00
netmon all: add test for package comments, fix, add comments as needed 2024-07-10 09:57:00 -07:00
netns net/netns: remove some logspam by avoiding logging parse errors due to unspecified addresses 2024-07-31 12:34:16 -06:00
netstat all: add test for package comments, fix, add comments as needed 2024-07-10 09:57:00 -07:00
netutil all: add test for package comments, fix, add comments as needed 2024-07-10 09:57:00 -07:00
packet net/flowtrack: optimize Tuple type for use as map key 2024-06-18 21:31:48 -07:00
ping net/ping: fix ICMP echo code field to 0 2023-09-15 17:08:39 -07:00
portmapper all: use math/rand/v2 more 2024-06-05 15:24:04 -07:00
proxymux all: cleanup unused code, part 1 (#10661) 2023-12-20 14:50:30 -08:00
routetable net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
socks5 net/socks5: add password auth support 2023-03-05 14:08:34 -08:00
sockstats net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
speedtest all: update copyright and license headers 2023-01-27 15:36:29 -08:00
stun ci: enable checklocks workflow for specific packages 2024-06-26 13:55:07 -04:00
stunserver all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
tcpinfo all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
tlsdial net/tlsdial: relax self-signed cert health warning 2024-07-31 10:03:48 -07:00
tsaddr net/ipset, wgengine/filter/filtertype: add split-out packages 2024-06-16 15:25:23 -07:00
tsdial go.mod: bump bart 2024-07-08 19:10:44 -07:00
tshttpproxy all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
tstun go.mod,net/tstun,wgengine/netstack: implement gVisor TCP GRO for Linux (#12921) 2024-08-02 10:41:10 -07:00
wsconn ci: enable checklocks workflow for specific packages 2024-06-26 13:55:07 -04:00