Mikio Hara
322214cf54
net: fix slow network interface manipulations
...
This CL reduces unnecessary network facility lookups introduced
by recent changes below.
changeset: 15798:53a4da6a4f4a
net: return correct point-to-point interface address on linux
changeset: 15799:a81ef8e0cc05
net: set up IPv6 scoped addressing zone for network facilities
Also adds a test case for issue 4839.
Benchmark results on linux/amd64, virtual machine:
benchmark old ns/op new ns/op delta
BenchmarkInterfaces-2 80487 80382 -0.13%
BenchmarkInterfaceByIndex-2 72013 71391 -0.86%
BenchmarkInterfaceByName-2 79865 80101 +0.30%
BenchmarkInterfaceAddrs-2 42071 829677 +1872.09%
BenchmarkInterfacesAndAddrs-2 35016 607622 +1635.27%
BenchmarkInterfacesAndMulticastAddrs-2 169849 169082 -0.45%
old: 15797:9c3930413c1b, new: tip
Benchmark results on linux/amd64, virtual machine:
benchmark old ns/op new ns/op delta
BenchmarkInterfaces-2 80487 81459 +1.21%
BenchmarkInterfaceByIndex-2 72013 71512 -0.70%
BenchmarkInterfaceByName-2 79865 80567 +0.88%
BenchmarkInterfaceAddrs-2 42071 120108 +185.49%
BenchmarkInterfacesAndAddrs-2 35016 33259 -5.02%
BenchmarkInterfacesAndMulticastAddrs-2 169849 82391 -51.49%
old: 15797:9c3930413c1b, new: tip+CL7400055
Benchmark results on darwin/amd64:
benchmark old ns/op new ns/op delta
BenchmarkInterfaces-2 34402 34231 -0.50%
BenchmarkInterfaceByIndex-2 13192 12956 -1.79%
BenchmarkInterfaceByName-2 34791 34388 -1.16%
BenchmarkInterfaceAddrs-2 36565 63906 +74.77%
BenchmarkInterfacesAndAddrs-2 17497 31068 +77.56%
BenchmarkInterfacesAndMulticastAddrs-2 25276 66711 +163.93%
old: 15797:9c3930413c1b, new: tip
Benchmark results on darwin/amd64:
benchmark old ns/op new ns/op delta
BenchmarkInterfaces-2 34402 31854 -7.41%
BenchmarkInterfaceByIndex-2 13192 12950 -1.83%
BenchmarkInterfaceByName-2 34791 31926 -8.23%
BenchmarkInterfaceAddrs-2 36565 42144 +15.26%
BenchmarkInterfacesAndAddrs-2 17497 17329 -0.96%
BenchmarkInterfacesAndMulticastAddrs-2 25276 24870 -1.61%
old: 15797:9c3930413c1b, new: tip+CL7400055
Update #4234 .
Fixes #4839 (again).
Fixes #4866 .
R=golang-dev, fullung
CC=golang-dev
https://golang.org/cl/7400055
2013-02-28 14:58:41 +09:00
Mikio Hara
40c2fbf4f2
net: set up IPv6 scoped addressing zone for network facilities
...
This CL changes nothing to existing API behavior, just sets up
Zone in IPNet and IPAddr structures if possible.
Also does small simplification.
Update #4234 .
R=rsc, dave
CC=golang-dev
https://golang.org/cl/7300081
2013-02-20 08:18:04 +09:00
Alex Brainman
94064548c6
net: use windows sysSocket everywhere
...
R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/7273046
2013-02-04 16:03:41 +11:00
Robert Griesemer
d724631a53
all: various typos
...
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5820045
2012-03-13 17:29:07 -07:00
Mikio Hara
28397befab
net: replace error variable name e, errno with err
...
R=rsc, r
CC=golang-dev
https://golang.org/cl/5593046
2012-02-01 00:36:45 +09:00
Alex Brainman
ef65feda2a
syscall: return error, not uintptr, when function returns error
...
R=rsc
CC=golang-dev
https://golang.org/cl/5450119
2011-12-08 12:07:21 +11:00
Russ Cox
c017a8299f
syscall: use error
...
- syscall (not os) now defines the Errno type.
- the low-level assembly functions Syscall, Syscall6, and so on
return Errno, not uintptr
- syscall wrappers all return error, not uintptr.
R=golang-dev, mikioh.mikioh, r, alex.brainman
CC=golang-dev
https://golang.org/cl/5372080
2011-11-13 22:44:52 -05:00
Russ Cox
eb6929299b
src/pkg/[n-z]*: gofix -r error -force=error
...
R=golang-dev, bsiegert, iant
CC=golang-dev
https://golang.org/cl/5294074
2011-11-01 22:05:34 -04:00
Mikio Hara
946cb0ece1
net: joined group addresses for a specific interface for darwin, freebsd, linux
...
This CL enables to list the multicast, joined group addresses
for a specific interface by using Interface.MulticastAddrs
method.
R=rsc
CC=golang-dev
https://golang.org/cl/4808062
2011-08-04 00:22:52 -04:00
Robert Griesemer
90564a9256
go/printer: changed max. number of newlines from 3 to 2
...
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go
(cd src/cmd/gofix/testdata; gofmt -w *.in *.out)
(cd src/pkg/go/printer; gotest -update)
gofmt -w misc src
runs all tests
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4715041
2011-07-14 14:39:40 -07:00
Wei Guangjing
63b8b948d9
windows: define and use syscall.Handle
...
Fixes #1487 .
R=rsc, alex.brainman, go.peter.90, mikioh.mikioh, mattn.jp
CC=golang-dev
https://golang.org/cl/4600042
2011-07-01 10:18:07 -04:00
Yasuhiro Matsumoto
88442358a9
net, syscall: interface for windows
...
R=mikioh.mikioh, alex.brainman, rsc, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4590050
2011-06-23 09:54:57 +10:00