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

Comments

Projects
None yet
6 participants
@cuisj
Copy link

commented Feb 5, 2018

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

@ericlagergren

This comment has been minimized.

Copy link
Contributor

commented Feb 5, 2018

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

@davecheney

This comment has been minimized.

Copy link
Contributor

commented Feb 5, 2018

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?

@cuisj cuisj closed this Feb 5, 2018

@mikioh mikioh changed the title SO_REUSEPORT net: support for the socket option SO_REUSEPORT Feb 5, 2018

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Feb 5, 2018

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

@mengzhuo

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2018

@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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2018

@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

This comment has been minimized.

Copy link
Contributor

commented Sep 21, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.