freebsd-dev/sys/netinet
Alexander V. Chernikov fedeb08b6a Introduce scalable route multipath.
This change is based on the nexthop objects landed in D24232.

The change introduces the concept of nexthop groups.
Each group contains the collection of nexthops with their
 relative weights and a dataplane-optimized structure to enable
 efficient nexthop selection.

Simular to the nexthops, nexthop groups are immutable. Dataplane part
 gets compiled during group creation and is basically an array of
 nexthop pointers, compiled w.r.t their weights.

With this change, `rt_nhop` field of `struct rtentry` contains either
 nexthop or nexthop group. They are distinguished by the presense of
 NHF_MULTIPATH flag.
All dataplane lookup functions returns pointer to the nexthop object,
leaving nexhop groups details inside routing subsystem.

User-visible changes:

The change is intended to be backward-compatible: all non-mpath operations
 should work as before with ROUTE_MPATH and net.route.multipath=1.

All routes now comes with weight, default weight is 1, maximum is 2^24-1.

Current maximum multipath group width is statically set to 64.
 This will become sysctl-tunable in the followup changes.

Using functionality:
* Recompile kernel with ROUTE_MPATH
* set net.route.multipath to 1

route add -6 2001:db8::/32 2001:db8::2 -weight 10
route add -6 2001:db8::/32 2001:db8::3 -weight 20

netstat -6On

Nexthop groups data

Internet6:
GrpIdx  NhIdx     Weight   Slots                                 Gateway     Netif  Refcnt
1         ------- ------- ------- --------------------------------------- ---------       1
              13      10       1                             2001:db8::2     vlan2
              14      20       2                             2001:db8::3     vlan2

Next steps:
* Land outbound hashing for locally-originated routes ( D26523 ).
* Fix net/bird multipath (net/frr seems to work fine)
* Add ROUTE_MPATH to GENERIC
* Set net.route.multipath=1 by default

Tested by:	olivier
Reviewed by:	glebius
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D26449
2020-10-03 10:47:17 +00:00
..
cc TCP newreno: improve after_idle ssthresh 2020-09-25 10:23:14 +00:00
khelp
libalias net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
netdump Use zfree() instead of explicit_bzero() and free(). 2020-06-25 20:17:34 +00:00
tcp_stacks So it turns out that syzkaller hit another crash. It has to do with switching 2020-09-09 11:11:50 +00:00
accf_data.c Define a module version for accept filter modules. 2020-05-19 18:35:08 +00:00
accf_dns.c Define a module version for accept filter modules. 2020-05-19 18:35:08 +00:00
accf_http.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
dccp.h Add header definition for RFC4340, Datagram Congestion Control Protocol 2020-06-17 13:27:13 +00:00
icmp6.h Convert IP/IPv6 forwarding, ICMP processing and IP PCB laddr selection to 2020-04-14 23:06:25 +00:00
icmp_var.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
if_ether.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
if_ether.h Retire arpresolve_addr(), which is not used anywhere, from if_ether.c. 2018-11-17 16:08:36 +00:00
igmp_var.h
igmp.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
igmp.h
in_cksum.c
in_debug.c
in_fib.c Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
in_fib.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in_gif.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in_jail.c
in_kdtrace.c Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
in_kdtrace.h Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
in_mcast.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in_pcb.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in_pcb.h Allow TCP to reuse local port with different destinations 2020-05-18 22:53:12 +00:00
in_pcbgroup.c
in_prot.c
in_proto.c Remove unused nhop_ref_any() function. 2020-09-20 21:32:52 +00:00
in_rmx.c Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
in_rss.c
in_rss.h
in_systm.h
in_var.h Simplify dom_<rtattach|rtdetach>. 2020-08-14 21:29:56 +00:00
in.c Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
in.h White space cleanup -- remove trailing tab's or spaces 2020-02-12 13:31:36 +00:00
ip6.h Remove stale definitions. The removed definitions are not used right 2020-03-01 12:34:27 +00:00
ip_carp.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_carp.h carp: replace caddr_t with char * 2019-12-06 16:35:48 +00:00
ip_divert.c Add the SCTP_SUPPORT kernel option. 2020-06-18 19:32:34 +00:00
ip_divert.h
ip_dummynet.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_ecn.c
ip_ecn.h
ip_encap.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
ip_encap.h Add KPI that can be used by tunneling interfaces to handle IP addresses 2018-10-21 17:55:26 +00:00
ip_fastfwd.c Convert IP/IPv6 forwarding, ICMP processing and IP PCB laddr selection to 2020-04-14 23:06:25 +00:00
ip_fw.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_gre.c Introduce NET_EPOCH_CALL() macro and use it everywhere where we free 2020-01-15 06:05:20 +00:00
ip_icmp.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_icmp.h
ip_id.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
ip_input.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_mroute.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_mroute.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_options.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_options.h
ip_output.c Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
ip_reass.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
ip_var.h This commit adds BBR (Bottleneck Bandwidth and RTT) congestion control. This 2019-09-24 18:18:11 +00:00
ip.h carp: Set DSCP value CS7 2018-07-01 08:37:07 +00:00
pim_var.h
pim.h
raw_ip.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
sctp_asconf.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_asconf.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_auth.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_auth.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_bsd_addr.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_bsd_addr.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_cc_functions.c Whitespace changes. 2020-09-24 12:26:06 +00:00
sctp_constants.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_crc32.c No need to include netinet/sctp_crc32.h twice. 2020-06-22 14:36:14 +00:00
sctp_crc32.h Add the SCTP_SUPPORT kernel option. 2020-06-18 19:32:34 +00:00
sctp_header.h Whitespace changes. 2020-09-24 12:26:06 +00:00
sctp_indata.c Cleanup, no functional change intended. 2020-09-27 13:32:02 +00:00
sctp_indata.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_input.c Improve the input validation and processing of cookies. 2020-09-29 09:36:06 +00:00
sctp_input.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_kdtrace.c Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
sctp_kdtrace.h Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
sctp_lock_bsd.h Whitespace changes. 2020-09-24 12:26:06 +00:00
sctp_module.c Provide support for building SCTP as a loadable module. 2020-07-10 14:56:05 +00:00
sctp_os_bsd.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_os.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_output.c Whitespace changes. 2020-09-24 12:26:06 +00:00
sctp_output.h Whitespace changes. 2020-09-24 12:26:06 +00:00
sctp_pcb.c Improve the input validation and processing of cookies. 2020-09-29 09:36:06 +00:00
sctp_pcb.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_peeloff.c Non-functional changes due to upstream cleanup. 2020-06-11 13:34:09 +00:00
sctp_peeloff.h
sctp_ss_functions.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_structs.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_syscalls.c Cleanup, no functional change intended. 2020-07-12 18:34:09 +00:00
sctp_sysctl.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_sysctl.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_timer.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_timer.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_uio.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_usrreq.c Whitespace changes. 2020-09-24 12:26:06 +00:00
sctp_var.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctputil.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctputil.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
siftr.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_debug.c
tcp_debug.h
tcp_fastopen.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_fastopen.h
tcp_fsm.h White space cleanup -- remove trailing tab's or spaces 2020-02-12 13:31:36 +00:00
tcp_hostcache.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tcp_hostcache.h
tcp_hpts.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_hpts.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_input.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_log_buf.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_log_buf.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_lro.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_lro.h White space cleanup -- remove trailing tab's or spaces 2020-02-12 13:31:36 +00:00
tcp_offload.c Initial support for kernel offload of TLS receive. 2020-04-27 23:17:19 +00:00
tcp_offload.h Initial support for kernel offload of TLS receive. 2020-04-27 23:17:19 +00:00
tcp_output.c TCP: send full initial window when timestamps are in use 2020-09-25 10:38:19 +00:00
tcp_pcap.c Step 4.2: start divorce of M_EXT and M_EXTPG 2020-05-03 00:37:16 +00:00
tcp_pcap.h
tcp_ratelimit.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_ratelimit.h Fix copyright year and eliminate the obsolete all rights reserved line. 2020-04-08 17:55:45 +00:00
tcp_reass.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_sack.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_seq.h
tcp_stats.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tcp_subr.c TCP: send full initial window when timestamps are in use 2020-09-25 10:38:19 +00:00
tcp_syncache.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_syncache.h Fix the following issues related to the TCP SYN-cache: 2020-08-10 20:24:48 +00:00
tcp_timer.c Improve the TCP blackhole detection. The principle is to reduce the 2020-04-14 16:35:05 +00:00
tcp_timer.h Reduce default TCP delayed ACK timeout to 40ms. 2020-04-16 15:59:23 +00:00
tcp_timewait.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tcp_usrreq.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_var.h Export the name of the congestion control. This will be used by sockstat 2020-09-13 09:06:50 +00:00
tcp.h TCP: send full initial window when timestamps are in use 2020-09-25 10:38:19 +00:00
tcpip.h
toecore.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
toecore.h Initial support for kernel offload of TLS receive. 2020-04-27 23:17:19 +00:00
udp_usrreq.c Initialize some local variables earlier 2020-09-18 14:01:10 +00:00
udp_var.h Add a knob to allow zero UDP checksums for UDP/IPv6 traffic on the given UDP port. 2020-09-18 02:21:15 +00:00
udp.h White space cleanup -- remove trailing tab's or spaces 2020-02-12 13:31:36 +00:00
udplite.h White space cleanup -- remove trailing tab's or spaces 2020-02-12 13:31:36 +00:00