Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: support for the socket option SO_REUSEPORT #23696

Closed
cuisj opened this issue Feb 5, 2018 · 7 comments
Closed

net: support for the socket option SO_REUSEPORT #23696

cuisj opened this issue Feb 5, 2018 · 7 comments

Comments

@cuisj
Copy link

cuisj commented Feb 5, 2018

Does net.Conn support SO_REUSEPORT in linux platform in plan ?

@ericlagergren
Copy link
Contributor

ericlagergren commented Feb 5, 2018

If you have questions about Go you should check out https://github.com/golang/go/wiki/Questions.

@davecheney
Copy link
Contributor

No, we don't currently use SO_REUSEPORT on linux.

Can you please explain the problem you are trying to solve that having SO_REUSEPORT available would let you solve?

@davecheney davecheney added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Feb 5, 2018
@cuisj cuisj closed this as completed Feb 5, 2018
@mikioh mikioh changed the title SO_REUSEPORT net: support for the socket option SO_REUSEPORT Feb 5, 2018
@mikioh
Copy link
Contributor

mikioh commented Feb 5, 2018

Go 1.11 probably will fix #9661 instead of exposing a tangle of platform-specific socket options.

@mengzhuo
Copy link
Contributor

@mikioh Noop, I build with master branch 25c3bb3 and it's still missing.

I tried to run src/syscall/mkall.sh on my Debian box to update SO_REUSEPORT but it change const and breaks API checker. Did I miss somethings? :/

-       AF_MAX                           = 0x27
+       AF_MAX                           = 0x2a

@mikioh
Copy link
Contributor

mikioh commented Jul 11, 2018

@mengzhuo,

The site "godoc.org" is your friend.

https://godoc.org/golang.org/x/sys/unix
https://godoc.org/syscall

If your circumstances have no reachability to the site, unfortunately, https://github.com/golang/go/wiki/Questions could help you.

@mengzhuo
Copy link
Contributor

@mikioh
syscall

This package is locked down. Code outside the standard Go repository should be migrated to use the corresponding package in the golang.org/x/sys repository.

Thanks for your reply, please ignore it :)

@theclapp
Copy link
Contributor

@mikioh's previous comment (#23696 (comment)) touches on this obliquely, but more directly:

The syscall.SO_REUSEPORT constant does not exist under linux/amd64, and a few other OS/ARCHes. You have to use golang.org/x/sys/unix.SO_REUSEPORT.

@golang golang locked and limited conversation to collaborators Sep 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants