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

gh-124761: add socket.SO_REUSEPORT_LB #124961

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

graingert
Copy link
Contributor

@graingert graingert commented Oct 4, 2024

@graingert
Copy link
Contributor Author

this is only half of the work as the flag needs to be used when reuse_port=True is passed to various apis

@graingert graingert marked this pull request as ready for review October 4, 2024 10:00
Copy link
Contributor

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the PR for SO_ORIGINAL_DST that I just reviewed, I didn't really feel the need to document it since we don't really document every constant (and it was better to have the constant included without going through a round of documentation review).

Here, since it's FreeBSD-only I think it's nice to document it (SO_ORIGINAL_DST is exposed assuming some headers, which would probably make its docs a bit messy I think). Since there's no conditional header, I appreciate the additional documentation.

Note: I haven't thought about it but we could have actually added some .. versionadded to the SO_* entries though for SO_ORIGINAL_DST.


I'd also like @erlend-aasland's review on this one if possible.

@@ -0,0 +1 @@
Add ``SO_REUSEPORT_LB`` constant to :mod:`socket` for FreeBSD.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Add ``SO_REUSEPORT_LB`` constant to :mod:`socket` for FreeBSD.
Add :data:`~socket.SO_REUSEPORT_LB` constant to :mod:`socket` for FreeBSD.

@@ -674,6 +674,14 @@ Constants

.. availability:: Linux >= 3.9

.. data:: SO_REUSEPORT_LB

Constant to enable duplicate address and port bindings with load balancing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should SO_REUSEPORT_LB be preferred on FreeBSD instead of SO_REUSEPORT?


.. versionadded:: 3.14

.. availability:: FreeBSD.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we specify the minimal FreeBSD version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants