sbruno d0aeaa5af7 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).

This is a substantially different contribution as compared to its original
incarnation at svn r332894 and reverted at svn r332967.  Thanks to rwatson@
for the substantive feedback that is included in this commit.

Submitted by:	Johannes Lundberg <johalun0@gmail.com>
Obtained from:	DragonflyBSD
Relnotes:	Yes
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D11003
2018-06-06 15:45:57 +00:00
..
2018-04-13 20:30:49 +00:00
2017-11-30 20:33:45 +00:00
2018-06-01 13:26:45 +00:00
2018-05-24 17:06:00 +00:00
2018-05-06 00:19:48 +00:00
2018-05-19 03:55:42 +00:00
2018-05-22 15:13:25 +00:00
2018-05-04 22:48:10 +00:00
2017-12-13 16:30:39 +00:00
2018-05-07 23:36:16 +00:00
2018-05-07 23:36:16 +00:00
2017-08-07 14:09:57 +00:00
2017-11-30 20:33:45 +00:00
2018-04-08 16:34:10 +00:00
2018-05-19 03:49:36 +00:00
2018-06-01 13:26:45 +00:00
2018-05-10 13:19:42 +00:00
2018-06-01 13:26:45 +00:00
2018-06-04 19:36:47 +00:00
2018-06-01 13:26:45 +00:00
2018-03-27 15:20:03 +00:00
2018-05-19 04:10:53 +00:00
2018-06-01 13:26:45 +00:00
2018-05-20 04:45:05 +00:00
2018-06-06 15:12:19 +00:00
2018-06-01 13:26:45 +00:00