Skip to content

Conversation

@devnexen
Copy link
Member

@devnexen devnexen commented Oct 20, 2025

SO_REUSEPORT on FreeBSD acts differently as the underlying semantic
is different (as it predates Linux) since it s more for UDP/multicasts.
The SO_REUSEPORT_LB flag, however, uses load balancing for group
of address:port combinations which is how Linux is implemented.

@devnexen devnexen requested a review from bukka as a code owner October 20, 2025 21:47
@devnexen devnexen force-pushed the so_reuseport_lb_network branch from cb89b23 to 23cd119 Compare October 20, 2025 21:48
@bukka bukka force-pushed the so_reuseport_lb_network branch from 23cd119 to 98b9c4f Compare November 3, 2025 10:54
Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

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

It makes sense to use SO_REUSEPORT_LB if available (FreeBSD). I just rewrote the implementation so it doesn't undef SO_REUSEPORT and use proper comments.

SO_REUSEPORT on FreeBSD acts differently as the underlying semantic
is different (as it predates Linux) since it s more for UDP/multicasts.
The SO_REUSEPORT_LB flag, however, uses load balancing for group
of address:port combinations which is how Linux is implemented.

Co-authored-by: Jakub Zelenka <bukka@php.net>
@bukka bukka force-pushed the so_reuseport_lb_network branch from 51d4aab to e6a2f03 Compare November 3, 2025 11:02
@bukka
Copy link
Member

bukka commented Nov 3, 2025

I'm just looking to a test for SO_REUSEPORT so will include it here so leave the merging with me.

@bukka bukka merged commit 5151b9d into php:master Nov 3, 2025
11 checks passed
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