freebsd-dev/cddl/lib
Sean Bruno 7b7796eea5 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-04-23 19:51:00 +00:00
..
drti cddl: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:30:04 +00:00
libavl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
libctf DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
libdtrace Load balance sockets with new SO_REUSEPORT_LB option 2018-04-23 19:51:00 +00:00
libnvpair DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
libumem DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
libuutil DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
libzfs DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
libzfs_core DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
libzpool DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
Makefile Convert traditional ${MK_TESTS} conditional idiom for including test 2017-08-02 08:35:51 +00:00
Makefile.inc Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00