tailscale/wgengine
Brad Fitzpatrick e18c3a7d84 wgengine: optimize isLocalAddr a bit
On macOS/iOS, this removes a map lookup per outgoing packet.

Noticed it while reading code, not from profiles, but can't hurt.

BenchmarkGenLocalAddrFunc
BenchmarkGenLocalAddrFunc/map1
BenchmarkGenLocalAddrFunc/map1-4                16184868                69.78 ns/op
BenchmarkGenLocalAddrFunc/map2
BenchmarkGenLocalAddrFunc/map2-4                16878140                70.73 ns/op
BenchmarkGenLocalAddrFunc/or1
BenchmarkGenLocalAddrFunc/or1-4                 623055721                1.950 ns/op
BenchmarkGenLocalAddrFunc/or2
BenchmarkGenLocalAddrFunc/or2-4                 472493098                2.589 ns/op

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-03-28 21:23:25 -07:00
..
filter net/packet, wgengine/{filter,tstun}: add TSMP ping 2021-03-24 09:50:01 -07:00
magicsock net/tstun: rename TUN to Wrapper. 2021-03-26 23:15:22 -07:00
monitor wgengine/monitor: fix OpenBSD build 2021-03-26 09:16:43 -07:00
netstack net/tstun: rename TUN to Wrapper. 2021-03-26 23:15:22 -07:00
router wgengine: pass in an explicit router.Router, rather than a generator. 2021-03-26 22:01:55 -07:00
wgcfg wgengine: pass logger as a separate arg to device.NewDevice 2021-03-24 10:39:58 -07:00
wglog wgengine/wglog: drop 1/s "interface is up" messages. 2021-02-23 09:01:58 -08:00
winnet wgengine/winnet: don't build on non-windows 2021-02-09 21:09:24 -08:00
pendopen.go net/tstun: rename TUN to Wrapper. 2021-03-26 23:15:22 -07:00
userspace_test.go wgengine: optimize isLocalAddr a bit 2021-03-28 21:23:25 -07:00
userspace.go wgengine: optimize isLocalAddr a bit 2021-03-28 21:23:25 -07:00
watchdog_test.go wgengine: extend TestWatchdog timeout on macOS 2021-03-27 09:27:11 -07:00
watchdog.go many: gofmt. 2021-03-25 17:41:51 -07:00
wgengine.go many: gofmt. 2021-03-25 17:41:51 -07:00