From owner-freebsd-net@freebsd.org Wed Feb 24 21:40:36 2021 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89225549A72 for ; Wed, 24 Feb 2021 21:40:36 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward501o.mail.yandex.net (forward501o.mail.yandex.net [37.140.190.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dm8VD2WKhz4fq4; Wed, 24 Feb 2021 21:40:35 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from iva5-76c5c16f2a53.qloud-c.yandex.net (iva5-76c5c16f2a53.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:7bae:0:640:76c5:c16f]) by forward501o.mail.yandex.net (Yandex) with ESMTP id 3E8291E80146; Thu, 25 Feb 2021 00:40:32 +0300 (MSK) Received: from mail.yandex.ru (mail.yandex.ru [2a02:8084:d6bb:4a80:ed5b:b8e4:6a08:fd88]) by iva5-76c5c16f2a53.qloud-c.yandex.net (mxback/Yandex) with HTTP id Serur70IoqM1-eVIGDBPA; Thu, 25 Feb 2021 00:40:31 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1614202831; bh=fhcWfF7AB3aOPgDx394pCtmESxT2o9l9sZK7Lif5WIc=; h=Message-Id:Cc:Subject:In-Reply-To:Date:References:To:From; b=wViQzEdUlvTPuP4Nc0xRGKFunmAvuCM5BPlihHjOsK7dcHW8R7T9QOXkG2+x1CIcz 1yUBgEdy4yx5UcKAs2m9YnYkaJPiVioa0PfDsll+6bGC0fm0HQlGfM1aPX6PptAD/p JXb81XK8ZNfK+zSnoz3AvVrQqMY6uPoQzliJCRU0= Received: by iva3-44129a12660c.qloud-c.yandex.net with HTTP; Thu, 25 Feb 2021 00:40:31 +0300 From: Alexander V. Chernikov To: =?utf-8?B?T2xpdmllciBDb2NoYXJkLUxhYmLDqQ==?= , Marek Zarychta Cc: "freebsd-net@freebsd.org" In-Reply-To: References: <5670cd9a-cd10-2b89-1347-97a6c817c50f@sentex.net> <8696072a-dc25-8eff-04fa-4d1db13bf5cc@plan-b.pwste.edu.pl> <3588111612809020@mail.yandex.ru> <53ef5715-42ce-aad0-9a8b-11d91a9891e3@plan-b.pwste.edu.pl> <301391612827263@mail.yandex.ru> <2642181612914660@mail.yandex.ru> <2951613086198@mail.yandex.ru> <7121614026888@mail.yandex.ru> <7056db64-2e7f-6ad8-54a3-59ff406061cf@plan-b.pwste.edu.pl> Subject: Re: option FIB_ALGO and dpdk_lpm4 MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Wed, 24 Feb 2021 21:40:31 +0000 Message-Id: <2892341614202492@mail.yandex.ru> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 4Dm8VD2WKhz4fq4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 21:40:36 -0000 24.02.2021, 10:50, "Olivier Cochard-Labbé" : > On Wed, Feb 24, 2021 at 1:22 AM Marek Zarychta < > zarychtam@plan-b.pwste.edu.pl> wrote: > >>  > >> >>  Please let me ask only one final question. Does adding: >> >>  net.route.algo.inet.algo=dpdk_lpm4 >>  net.route.algo.inet6.algo=dpdk_lpm6 >> >>  to /etc/sysctl.conf make any sense? I see that right FIB_ALGO is >>  automatically picked up when the module is available. > > My understanding is the network stack will switch to the optimum algorithm > regarding the number of routes installed. > cf "Automatic algorithm selection" chapter here: > https://reviews.freebsd.org/D27401 > > So you don't need to set this sysctl. To add some points to Olivier's explanation: indeed, algorithm selection SHOULD happen automatically. Some things to keep in mind: when the BGP sessions flaps kernel routes may go from the full-view to near-zero and vice versa. In that case, automatic selection will switch to lockless_radix for the range between 10..1000 routes (or similar). Lockless radix schedules rebuild for every change, so the speed of deleting/adding first 1k routes may be slower than expected. > > Regards, > > Olivier > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"