4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00
sbruno 5c636abe89 Load balance sockets with new SO_REUSEPORT_LB option
This patch adds a new socket option, SO_REUSEPORT_LB, which allow multiple
programs or threads to bind to the same port and incoming connections will be
load balanced using a hash function.

Most of the code was copied from a similar patch for DragonflyBSD.

However, in DragonflyBSD, load balancing is a global on/off setting and can not
be set per socket. This patch allows for simultaneous use of both the current
SO_REUSEPORT and the new SO_REUSEPORT_LB options on the same system.

Required changes to structures
Globally change so_options from 16 to 32 bit value to allow for more options.
Add hashtable in pcbinfo to hold all SO_REUSEPORT_LB sockets.

Limitations
As DragonflyBSD, a load balance group is limited to 256 pcbs
(256 programs or threads sharing the same socket).

Submitted by:	Johannes Lundberg <johanlun0@gmail.com>
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D11003
2018-08-24 15:00:04 +02:00
..
2018-01-17 11:47:26 -06:00
2017-12-07 11:54:11 +00:00
2018-07-30 10:47:57 +02:00
2018-01-17 11:47:26 -06:00
2018-03-16 10:21:23 +01:00
2017-12-07 11:54:11 +00:00
2018-08-08 10:50:19 +02:00
2018-01-17 11:47:30 -06:00
2018-04-13 15:42:37 -04:00
2017-11-29 11:25:46 -06:00
2017-11-29 11:25:45 -06:00
2017-11-29 11:25:45 -06:00
2017-11-29 11:25:46 -06:00
2017-11-29 11:25:46 -06:00