freebsd-dev/sys/conf
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
..
config.mk Add SCTP_SUPPORT handling to config.mk. 2020-06-25 15:25:00 +00:00
dtb.build.mk Use MACHINE_CPUARCH when checking for arm64 2020-09-14 16:12:28 +00:00
dtb.mk Allow kernel config to specify DTS/DTSO to build, and out-of-tree support 2019-03-26 02:45:23 +00:00
files Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
files.amd64 ice_ddp: Update package file to 1.3.16.0 2020-09-04 17:37:58 +00:00
files.arm Remove support for DES and Triple DES from OCF. 2020-05-11 21:34:29 +00:00
files.arm64 Move gpio and hwpmc to the correct place in files.arm64 2020-09-08 11:46:33 +00:00
files.i386 Remove support for DES and Triple DES from OCF. 2020-05-11 21:34:29 +00:00
files.mips Remove support for DES and Triple DES from OCF. 2020-05-11 21:34:29 +00:00
files.powerpc [PowerPC64LE] Set up powerpc.powerpc64le architecture 2020-09-22 23:49:30 +00:00
files.riscv riscv: Include syscon_power device driver in GENERIC kernel config 2020-07-26 18:21:02 +00:00
files.x86 Rename kernel option ACPI_DMAR to IOMMU. 2020-09-29 20:29:07 +00:00
kern.mk [PowerPC64LE] Set up powerpc.powerpc64le architecture 2020-09-22 23:49:30 +00:00
kern.opts.mk RISC-V: enable MK_FORMAT_EXTENSIONS 2020-09-08 13:24:44 +00:00
kern.post.mk Pass -fuse-ld=/path/to/ld if ${LD} != "ld" 2020-08-25 13:30:03 +00:00
kern.pre.mk Build debug kernels with -O2. 2020-09-29 11:48:22 +00:00
kmod_syms_prefix.awk
kmod_syms.awk
kmod.mk linuxkpi: Add backlight support 2020-10-02 18:26:41 +00:00
kmod.opts.mk Add a kmod.opts.mk. 2019-11-21 18:14:26 +00:00
ldscript.amd64 Tighten mapping protections on preloaded files on amd64. 2019-10-18 14:05:13 +00:00
ldscript.arm Eliminate the generated ldscript for arm and arm64, and strip $a/$d marker 2019-12-29 18:17:12 +00:00
ldscript.arm64 Eliminate the generated ldscript for arm and arm64, and strip $a/$d marker 2019-12-29 18:17:12 +00:00
ldscript.i386 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.kmod.amd64 Move PLTs to the beginning of amd64 kernel modules. 2020-09-16 13:51:47 +00:00
ldscript.kmod.i386 Formalize the use of linker scripts for kernel modules. 2019-10-16 22:19:56 +00:00
ldscript.mips Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips.cfe Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips.mips64 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips.octeon1 Fix linking OCTEON1 kernel with LLD 2020-03-22 22:18:00 +00:00
ldscript.powerpc [PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities. 2020-05-07 19:32:49 +00:00
ldscript.powerpc64 [PowerPC] Fix build-id note on powerpc64 kernel 2020-06-01 19:40:59 +00:00
ldscript.powerpc64le [PowerPC64LE] Set up powerpc.powerpc64le architecture 2020-09-22 23:49:30 +00:00
ldscript.powerpcspe [PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities. 2020-05-07 19:32:49 +00:00
ldscript.riscv Set the LMA of the riscv kernel to the OpenSBI jump target by default 2020-02-04 00:06:16 +00:00
Makefile.amd64 Don't try ctfconvert on file without debug info. 2020-04-28 16:09:25 +00:00
Makefile.arm Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
Makefile.arm64 Eliminate the generated ldscript for arm and arm64, and strip $a/$d marker 2019-12-29 18:17:12 +00:00
Makefile.i386 Retire CLANG_NO_IAS34 2018-11-01 23:11:47 +00:00
Makefile.mips Compile hack.c with normal CFLAGS + -shared -nostdlib. 2020-01-26 14:19:08 +00:00
Makefile.powerpc Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
Makefile.riscv Simplify the RISC-V kernel linker invocation 2020-05-22 18:54:56 +00:00
makeLINT.mk remove reference to obsolete arm NOTES files 2020-09-23 14:52:43 +00:00
makeLINT.sed
newvers.sh Partially revert r346018 and use the if/then construct instead of shell. 2020-09-14 14:45:30 +00:00
NOTES Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
options Introduce scalable route multipath. 2020-10-03 10:47:17 +00:00
options.amd64 Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
options.arm Kill old armv4 busdma 2020-02-02 08:27:14 +00:00
options.arm64 Add i.MX 8M Quad support 2020-07-01 00:33:16 +00:00
options.i386 i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
options.mips
options.powerpc [PowerPC64LE] Work around qemu TCG bug in mtmsrd emulation. 2020-09-23 00:09:29 +00:00
options.riscv
sysent.mk Rebuild sysent when capabilities.conf is updated. 2020-07-07 16:35:52 +00:00
systags.sh Fix kernel-tags target. 2020-01-23 13:56:12 +00:00
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE retire cx,ctau drivers 2020-03-20 16:50:19 +00:00