tailscale/net
David Anderson 2d604b3791 net/packet: represent IP6 as two uint64s.
For the operations we perform on these types (mostly net6.Contains),
this encoding is much faster.

Part of #19.

name                   old time/op    new time/op    delta
Filter/icmp4-8           27.5ns ± 1%    28.0ns ± 2%   +1.89%  (p=0.016 n=5+5)
Filter/tcp4_syn_in-8     38.8ns ± 2%    38.3ns ± 1%   -1.24%  (p=0.024 n=5+5)
Filter/tcp4_syn_out-8    27.6ns ±12%    24.6ns ± 1%     ~     (p=0.063 n=5+5)
Filter/udp4_in-8         71.5ns ± 5%    65.9ns ± 1%   -7.94%  (p=0.008 n=5+5)
Filter/udp4_out-8         132ns ±13%     119ns ± 1%  -10.29%  (p=0.008 n=5+5)
Filter/icmp6-8            169ns ±10%      54ns ± 1%  -68.35%  (p=0.008 n=5+5)
Filter/tcp6_syn_in-8      149ns ± 6%      43ns ± 1%  -71.11%  (p=0.008 n=5+5)
Filter/tcp6_syn_out-8    37.7ns ± 4%    24.3ns ± 3%  -35.51%  (p=0.008 n=5+5)
Filter/udp6_in-8          179ns ± 5%     103ns ± 1%  -42.75%  (p=0.008 n=5+5)
Filter/udp6_out-8         156ns ± 3%     191ns ± 1%  +22.54%  (p=0.008 n=5+5)

Signed-off-by: David Anderson <danderson@tailscale.com>
2020-11-12 21:41:21 -08:00
..
dnscache net/dnscache, control/controlclient: use DNS cache when dialing control 2020-11-11 12:50:04 -08:00
interfaces net/interfaces: ignore bogus proxy URLs from winhttp [windows] 2020-11-10 11:30:18 -08:00
netcheck net/netcheck: remove unused DNSCache from netcheck 2020-11-11 11:52:35 -08:00
netns net/netns: don't bind to device for localhost connections 2020-10-13 15:24:07 -07:00
netstat net/netstat: start of new netstat package, with Windows for now 2020-09-10 15:24:49 -07:00
nettest scripts: add a license header checker. 2020-03-17 21:34:44 -07:00
packet net/packet: represent IP6 as two uint64s. 2020-11-12 21:41:21 -08:00
stun net/stun: Fix STUN attribute padding (#710) 2020-08-24 12:52:13 -07:00
tlsdial net/tlsdial, derp/derphttp: finish DERPNode.CertName validation 2020-06-01 09:01:37 -07:00
tsaddr tsaddr: add helpers for the Tailscale IPv6 range, and 4to6 conversion. 2020-10-15 15:15:24 -07:00
tshttpproxy net/tshttpproxy: aggressively rate-limit error logs in Transport.Proxy path 2020-11-03 09:23:57 -08:00