From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH RFC net-next] net/fib: Poptrie based FIB lookup Date: Mon, 27 Aug 2018 10:56:05 -0600 Message-ID: References: <20180827092420.791bb1ad@shemminger-XPS-13-9360> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Netdev , David Miller , Eric Dumazet , Alexey Kuznetsov , makita.toshiaki@lab.ntt.co.jp, panda@hongo.wide.ad.jp, yasuhiro.ohara@ntt.com, john.fastabend@gmail.com, alexei.starovoitov@gmail.com To: Stephen Hemminger , "Md. Islam" Return-path: Received: from mail-pg1-f196.google.com ([209.85.215.196]:34557 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726994AbeH0Unc (ORCPT ); Mon, 27 Aug 2018 16:43:32 -0400 Received: by mail-pg1-f196.google.com with SMTP id u10-v6so5982369pgr.1 for ; Mon, 27 Aug 2018 09:56:08 -0700 (PDT) In-Reply-To: <20180827092420.791bb1ad@shemminger-XPS-13-9360> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 8/27/18 10:24 AM, Stephen Hemminger wrote: > > Also, as Dave mentioned any implementation needs to handle multiple namespaces > and routing tables. > > Could this alternative lookup be enabled via sysctl at runtime rather than kernel config? > I spent time a couple of years ago refactoring IPv4 fib lookups with the intent of allowing different algorithms - for use cases like this: https://github.com/dsahern/linux/commits/net/ipv4-fib-ops (it is also another way to solve the API nightmare that ipv6 has become). But the poptrie patches that have been sent so far have much bigger problems that need to be addressed before anyone worries about how to select poptrie vs lc-trie. The patch does not handle errors (e.g., if attributes such as tos, metric/priority and multipath are not allowed you need to fail the route insert; further, what happens if someone creates > 255 netdevices?), last patch has both fib tables populated (a no-go), does not handle delete or dumps. In the current form, the poptrie algorithm can not be taken for a test drive. My suggestion to make it a compile time selection is just so people can actually try it out using current admin tools.