Skip to content

Add new FreeBSD socket option SO_REUSEPORT_LB. #1078

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

Merged
merged 2 commits into from
Sep 11, 2018

Conversation

johalun
Copy link
Contributor

@johalun johalun commented Sep 10, 2018

FreeBSD 12, which is scheduled to be released soon, has a new socket option SO_REUSEPORT_LB.
From setsockopt man page:
SO_REUSEPORT_LB allows completely duplicate bindings by multiple
processes if they all set SO_REUSEPORT_LB before binding the port.
Incoming TCP and UDP connections are distributed among the sharing
processes based on a hash function of local port number, foreign IP
address and port number. A maximum of 256 processes can share one socket.

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

Thanks! It look like though this is failing CI? It may be that our version of FreeBSD is too old, in which case can this be added to the whitelist to not test in libc-test/build.rs?

@johalun
Copy link
Contributor Author

johalun commented Sep 10, 2018

OK, added. I hope it was in the right place :)

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 10, 2018

📌 Commit f80b024 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Sep 10, 2018

⌛ Testing commit f80b024 with merge 995d7da...

bors added a commit that referenced this pull request Sep 10, 2018
Add new FreeBSD socket option SO_REUSEPORT_LB.

FreeBSD 12, which is scheduled to be released soon, has a new socket option SO_REUSEPORT_LB.
From setsockopt man page:
     SO_REUSEPORT_LB allows completely duplicate bindings by multiple
     processes if they all set SO_REUSEPORT_LB before binding the port.
     Incoming TCP and UDP connections are distributed among the sharing
     processes based on a hash function of local port number, foreign IP
     address and port number. A maximum of 256 processes can share one socket.
@bors
Copy link
Contributor

bors commented Sep 11, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 995d7da to master...

@bors bors merged commit f80b024 into rust-lang:master Sep 11, 2018
@johalun johalun deleted the so_reuseport_lb branch September 11, 2018 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants