freebsd-dev/cddl/lib/libdtrace
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
..
errno.d Add inline to errno.d for translating int to string 2018-02-16 04:22:29 +00:00
io.d Updates and enhancements to io.d to aid DTrace scripting 2018-02-24 17:13:15 +00:00
ip.d Use tabs in io.d, fix alignment issues, remove extraneous newlines 2018-02-12 23:53:38 +00:00
libproc_compat.h Use tabs in io.d, fix alignment issues, remove extraneous newlines 2018-02-12 23:53:38 +00:00
Makefile Add D definitions for the named values in socket.h 2017-09-07 03:05:16 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
net.d
nfs.d - Use an explicit "depends_on module kernel" guard in DTrace libraries that 2015-08-07 19:56:22 +00:00
nfssrv.d - Use an explicit "depends_on module kernel" guard in DTrace libraries that 2015-08-07 19:56:22 +00:00
psinfo.d Use tabs in io.d, fix alignment issues, remove extraneous newlines 2018-02-12 23:53:38 +00:00
regs_x86.d Use tabs in io.d, fix alignment issues, remove extraneous newlines 2018-02-12 23:53:38 +00:00
sched.d Use tabs in io.d, fix alignment issues, remove extraneous newlines 2018-02-12 23:53:38 +00:00
siftr.d - Use an explicit "depends_on module kernel" guard in DTrace libraries that 2015-08-07 19:56:22 +00:00
signal.d Consistent casing for fallback SIGCHLD (s/Unknown/unknown/) 2018-02-26 00:04:21 +00:00
socket.d Add D definitions for the named values in socket.h 2017-09-07 03:05:16 +00:00
tcp.d Load balance sockets with new SO_REUSEPORT_LB option 2018-04-23 19:51:00 +00:00
udp.d Use tabs in io.d, fix alignment issues, remove extraneous newlines 2018-02-12 23:53:38 +00:00
unistd.d