freebsd-dev/sys/netinet6
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
..
dest6.c Fix m_pullup() problem after removing PULLDOWN_TESTs and KAME EXT_*macros. 2019-12-01 00:22:04 +00:00
frag6.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
icmp6.c Fix IPv6 regression introduced by r362900. 2020-07-03 08:06:26 +00:00
icmp6.h
in6_cksum.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in6_fib.c Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
in6_fib.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in6_gif.c Switch gif(4) path verification to fib[46]_check_urfp(). 2020-05-28 07:26:18 +00:00
in6_ifattach.c Make sure the multicast release tasks are properly drained when 2020-08-10 10:46:08 +00:00
in6_ifattach.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
in6_jail.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
in6_mcast.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in6_pcb.c Allow TCP to reuse local port with different destinations 2020-05-18 22:53:12 +00:00
in6_pcb.h Allow TCP to reuse local port with different destinations 2020-05-18 22:53:12 +00:00
in6_pcbgroup.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
in6_proto.c Remove unused nhop_ref_any() function. 2020-09-20 21:32:52 +00:00
in6_rmx.c Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
in6_rss.c
in6_rss.h
in6_src.c Remove unused nhop_ref_any() function. 2020-09-20 21:32:52 +00:00
in6_var.h Simplify dom_<rtattach|rtdetach>. 2020-08-14 21:29:56 +00:00
in6.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in6.h Convert route caching to nexthop caching. 2020-04-25 09:06:11 +00:00
ip6_ecn.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip6_fastfwd.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip6_forward.c ipv6: quit dropping packets looping back on p2p interfaces 2020-08-31 01:45:48 +00:00
ip6_gre.c Introduce NET_EPOCH_CALL() macro and use it everywhere where we free 2020-01-15 06:05:20 +00:00
ip6_id.c ip6_randomflowlabel: Avoid blocking if random(4) is not available 2019-04-23 17:18:20 +00:00
ip6_input.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip6_mroute.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip6_mroute.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip6_output.c if_vxlan(4): add support for hardware assisted checksumming, TSO, and RSS. 2020-09-18 02:37:57 +00:00
ip6_var.h Convert route caching to nexthop caching. 2020-04-25 09:06:11 +00:00
ip6.h
ip6protosw.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip_fw_nat64.h Reapply r345274 with build fixes for 32-bit architectures. 2019-03-19 10:57:03 +00:00
ip_fw_nptv6.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
mld6_var.h icmpv6: Fix mbuf change in mld 2019-11-18 21:59:47 +00:00
mld6.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
mld6.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nd6_nbr.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
nd6_rtr.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
nd6.c Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
nd6.h Switch inet6 default route subscription to the new rib subscription api. 2020-07-12 11:24:23 +00:00
pim6_var.h Rework IP encapsulation handling code. 2018-06-05 20:51:01 +00:00
pim6.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
raw_ip6.c Make ip6_output() and ip_output() require network epoch. 2020-01-22 05:51:22 +00:00
raw_ip6.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
route6.c Fix m_pullup() problem after removing PULLDOWN_TESTs and KAME EXT_*macros. 2019-12-01 00:22:04 +00:00
scope6_var.h Make net.inet6.ip6.deembed_scopeid behaviour default & remove sysctl. 2020-08-15 11:37:44 +00:00
scope6.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp6_usrreq.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp6_var.h Whitespace changes due to changes in ident. 2018-07-19 20:16:33 +00:00
send.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
send.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
tcp6_var.h Remove tcp_rtlookup6() function signature. 2020-04-13 08:26:11 +00:00
udp6_usrreq.c 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
udp6_var.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00