From nobody Tue Mar 14 10:54:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PbVkz4bHwz3y77l; Tue, 14 Mar 2023 10:54:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PbVkz3m56z3kKG; Tue, 14 Mar 2023 10:54:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678791243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yAMaz9WsmLXG0YVOIz7niaOsTl/nibXbw9bsiEtSP6k=; b=CuFaKVOqXOxFfr7L54fioxlXLeXCOnMB7949K7YHbb8Dgazk63Rub6XBgBA5tF1EPnQcyn G1IDLNnQNfMildIl56eB1Vwg5zbtQLlhFqL1q1FmhSzL1SnLSpG1ZNn2TuXY+yv4jvn4X5 2aPg9+ifucGh/vT05AT1HbAnzjQKRUVUUslVAn3ZmH7Hy6q1Nc5yauSjDTn33oM2xQrd4w xweLgVyxzKYNh7N+McIjONmsa/MFG7odMLfhpMiIkSkrFsySwQpJazji275Bc/FZ6Ywt46 tZBuCaqVx6LNdun7Zdj1Fp9g4Gj9CT6GCJ7Iye1NHW+RakYYW4HrElcF6sYpOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678791243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yAMaz9WsmLXG0YVOIz7niaOsTl/nibXbw9bsiEtSP6k=; b=atddmCK1xoPDMZ2gqDyYvfFn89pqR/tvF3HJARcO/RZuBcU0CbhHIwPnRn+d8MVT7KyqUg C/PfxuIRWeyxQ1FlE7skZSaAytdXnX2TPVm+4MBBH7ITdTxC80Y1Uy0zIbfSUQ0nM0uwpa CWDpRaUev5NZnZC/eHjhA18aryW3FVWFzyWKDh+xpjcFSYSvdJDvabX3+Cya26vDyG8aSD s0E6aNdKT/DGipjJ5aXuQUF5H3dmG27SPe57T0dn5mc82XWyPaLOH2Ich9DmEAUzWKkAYU oItOLAwxYRowP5F39iDBZuo5Rgfus3QgH/gVZHIPSZTwewYd8hWG9o/2T5nBSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678791243; a=rsa-sha256; cv=none; b=nz7Mv4UxuQQ0pDQTL0seIWXH6dNrr+EvZwPtJCYxQo02t9cKlPNWqhhyB5GcgSxrOAl2w8 8hvms3O/idrA7wbqyNskjRweO08dI9PsVEN07Xe3Fl+j3zfFTALDai1I9j9BtA523uKeZ7 4xIDM0bk8xy2fmzAmraMJ2gDa1fsuIpllbGDSzq3JEDCNPztsughNugAysn+eqn7DS6M5C ee46+mJUdl91IHe5HAjbPK7wqmZlcDUsBg2nHWZoFTCVgzD9i4KNBLMt7+cb4swHbMJf8p SJ0N+w6ClecC9khjsJaEwVQuU4fobuairnrlF5Rip6BmmBi/7AX+1WEwSbMQRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PbVkz2pKkzXYM; Tue, 14 Mar 2023 10:54:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32EAs37O015167; Tue, 14 Mar 2023 10:54:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32EAs3DU015166; Tue, 14 Mar 2023 10:54:03 GMT (envelope-from git) Date: Tue, 14 Mar 2023 10:54:03 GMT Message-Id: <202303141054.32EAs3DU015166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 49a096e889c4 - releng/13.2 - route.8: Add information about ROUTE_MPATH and FIB_ALGO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 49a096e889c4cfca6606ef273e4f4c331b0ce3cb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=49a096e889c4cfca6606ef273e4f4c331b0ce3cb commit 49a096e889c4cfca6606ef273e4f4c331b0ce3cb Author: Gordon Bergling AuthorDate: 2023-02-26 13:15:34 +0000 Commit: Gordon Bergling CommitDate: 2023-03-14 10:52:45 +0000 route.8: Add information about ROUTE_MPATH and FIB_ALGO Since the kernel options ROUTE_MPATH and FIB_ALGO are enabled per default for a while, it's good to have some user facing documetation about the general functionality of multipath routing and fib lookup algorithms. Reviewed by: pauamma, Jose Luis Duran Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D38783 (cherry picked from commit b06338167d64507e79e003500002e22fbe583832) --- sbin/route/route.8 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/sbin/route/route.8 b/sbin/route/route.8 index 161189e7a9d8..c893ae5ab4b3 100644 --- a/sbin/route/route.8 +++ b/sbin/route/route.8 @@ -28,7 +28,7 @@ .\" @(#)route.8 8.3 (Berkeley) 3/19/94 .\" $FreeBSD$ .\" -.Dd December 15, 2021 +.Dd February 26, 2023 .Dt ROUTE 8 .Os .Sh NAME @@ -405,6 +405,60 @@ and .Dv RTM_CHANGE . As such, only the super-user may modify the routing tables. +.Pp +.Fx provides support for scalable multipath routing. +It is activated by default, but can be turned off by setting the +.Va net.route.multipath +.Xr sysctl 8 +MIB to 0. +.Pp +There are multiple route lookup algorithms available. +They can be configured by setting +.Va net.route.algo.inet.algo +for IPv4 and +.Va net.route.algo.inet6.algo +for IPv6 +.Xr sysctl 8 +MIBs. +.Pp +A list of available algorithms can be obtained by accessing the +following +.Xr sysctl 8 +MIBs +.Va net.route.algo.inet.algo_list +for IPv4 and +.Va net.route.algo.inet6.algo_list +for IPv6. +.Pp +The following algorithms are available: +.Bl -tag -width radix_lockless +.It radix +Base system radix backend. +.It bsearch +Lockless binary search in a special IP array, tailored for a small FIB +with <16 routes. +This algorithm is only available for IPv4. +.It radix_lockless +Lockless immutable radix, re-created on every rtable change, +tailored for a small FIB with <1000 routes. +.It dpdk_lpm +DPDK DIR24-8-based lookups, lockless datastructure, optimized +for a large FIB. +In order to use the dpdk_lpm algorithm one or both of the +following kernel modules must be loaded via +.Xr loader.conf 5 : +.Bl -tag -width dpdk_lpm6.ko -compact +.It dpdk_lpm4.ko +DPDK implementation for IPv4. +.It dpdk_lpm6.ko +DPDK implementation for IPv6. +.El +.El +.Pp +The algorithms are selected automatically based on the size of the routing +table of the system. +They can be changed, but not every algorithm performs best for every +FIB size. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES @@ -484,6 +538,7 @@ The next-hop gateway should be reachable through a different route. .Xr netstat 1 , .Xr netintro 4 , .Xr route 4 , +.Xr loader.conf 5 , .Xr arp 8 , .Xr routed 8 .Sh HISTORY