You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
5 years ago
..
filter net/packet, wgengine/{filter,tstun}: add TSMP ping 5 years ago
magicsock net/tstun: rename TUN to Wrapper. 5 years ago
monitor wgengine/monitor: fix OpenBSD build 5 years ago
netstack net/tstun: rename TUN to Wrapper. 5 years ago
router wgengine: pass in an explicit router.Router, rather than a generator. 5 years ago
wgcfg wgengine: pass logger as a separate arg to device.NewDevice 5 years ago
wglog wgengine/wglog: drop 1/s "interface is up" messages. 5 years ago
winnet wgengine/winnet: don't build on non-windows 5 years ago
pendopen.go net/tstun: rename TUN to Wrapper. 5 years ago
userspace.go wgengine: optimize isLocalAddr a bit 5 years ago
userspace_test.go wgengine: optimize isLocalAddr a bit 5 years ago
watchdog.go many: gofmt. 5 years ago
watchdog_test.go wgengine: extend TestWatchdog timeout on macOS 5 years ago
wgengine.go many: gofmt. 5 years ago