Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Feb 2021 21:40:31 +0000
From:      Alexander V. Chernikov <melifaro@ipfw.ru>
To:        =?utf-8?B?T2xpdmllciBDb2NoYXJkLUxhYmLDqQ==?= <olivier@freebsd.org>, Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: option FIB_ALGO and dpdk_lpm4
Message-ID:  <2892341614202492@mail.yandex.ru>
In-Reply-To: <CA%2Bq%2BTcqTh55fZbYQTt7giN-c9kL8iF28QDoaaF1vKXhyW6RsNA@mail.gmail.com>
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> <ecb75bc5-72fe-4583-8fe6-e0cb5347ae02@plan-b.pwste.edu.pl> <2642181612914660@mail.yandex.ru> <2951613086198@mail.yandex.ru> <b51320bb-d401-3d96-64a6-139f2c980ffa@plan-b.pwste.edu.pl> <7121614026888@mail.yandex.ru> <7056db64-2e7f-6ad8-54a3-59ff406061cf@plan-b.pwste.edu.pl> <CA%2Bq%2BTcqTh55fZbYQTt7giN-c9kL8iF28QDoaaF1vKXhyW6RsNA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
24.02.2021, 10:50, "Olivier Cochard-Labbé" <olivier@freebsd.org>:
> 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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2892341614202492>