freebsd-skq/sys/netinet6
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
..
dest6.c
frag6.c
icmp6.c UDP: further performance improvements on tx 2018-05-23 21:02:14 +00:00
icmp6.h
in6_cksum.c
in6_fib.c
in6_fib.h
in6_gif.c Rework if_gif(4) to use new encap_lookup_t method to speedup lookup 2018-06-05 21:24:59 +00:00
in6_ifattach.c UDP: further performance improvements on tx 2018-05-23 21:02:14 +00:00
in6_ifattach.h
in6_jail.c
in6_mcast.c Pair CURVNET_SET and CURVNET_RESTORE in a block 2018-05-21 13:08:44 +00:00
in6_pcb.c Load balance sockets with new SO_REUSEPORT_LB option. 2018-06-06 15:45:57 +00:00
in6_pcb.h
in6_pcbgroup.c
in6_proto.c Remove empty encap_init() function. 2018-05-29 12:32:08 +00:00
in6_rmx.c
in6_rss.c
in6_rss.h
in6_src.c Load balance sockets with new SO_REUSEPORT_LB option. 2018-06-06 15:45:57 +00:00
in6_var.h CK: update consumers to use CK macros across the board 2018-05-24 23:21:23 +00:00
in6.c CK: update consumers to use CK macros across the board 2018-05-24 23:21:23 +00:00
in6.h
ip6_ecn.h
ip6_fastfwd.c
ip6_forward.c
ip6_gre.c Fix LINT-NOINET build. 2018-06-06 05:17:21 +00:00
ip6_id.c
ip6_input.c UDP: further performance improvements on tx 2018-05-23 21:02:14 +00:00
ip6_mroute.c Rework IP encapsulation handling code. 2018-06-05 20:51:01 +00:00
ip6_mroute.h
ip6_output.c Load balance sockets with new SO_REUSEPORT_LB option. 2018-06-06 15:45:57 +00:00
ip6_var.h ip(6)_freemoptions: defer imo destruction to epoch callback task 2018-05-20 00:22:28 +00:00
ip6.h
ip6protosw.h
ip_fw_nat64.h
ip_fw_nptv6.h
mld6_var.h
mld6.c ifnet: Replace if_addr_lock rwlock with epoch + mutex 2018-05-18 20:13:34 +00:00
mld6.h
nd6_nbr.c
nd6_rtr.c ifnet: Replace if_addr_lock rwlock with epoch + mutex 2018-05-18 20:13:34 +00:00
nd6.c UDP: further performance improvements on tx 2018-05-23 21:02:14 +00:00
nd6.h
pim6_var.h Rework IP encapsulation handling code. 2018-06-05 20:51:01 +00:00
pim6.h
raw_ip6.c UDP: further performance improvements on tx 2018-05-23 21:02:14 +00:00
raw_ip6.h
route6.c
scope6_var.h Constify argument of in6_getscope(). 2018-06-05 20:54:29 +00:00
scope6.c Constify argument of in6_getscope(). 2018-06-05 20:54:29 +00:00
sctp6_usrreq.c
sctp6_var.h
send.c
send.h
tcp6_var.h
udp6_usrreq.c Load balance sockets with new SO_REUSEPORT_LB option. 2018-06-06 15:45:57 +00:00
udp6_var.h