From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0DB38A2EEB for ; Thu, 12 Sep 2019 11:47:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 558E41E904; Thu, 12 Sep 2019 11:47:50 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 11DE11E904 for ; Thu, 12 Sep 2019 11:47:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2019 02:47:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,489,1559545200"; d="scan'208";a="336524890" Received: from vmedvedk-mobl.ger.corp.intel.com (HELO [10.237.220.135]) ([10.237.220.135]) by orsmga004.jf.intel.com with ESMTP; 12 Sep 2019 02:47:45 -0700 To: =?UTF-8?Q?Morten_Br=c3=b8rup?= Cc: bruce.richardson@intel.com, dev@dpdk.org References: <1524780214-23196-1-git-send-email-medvedkinv@gmail.com> <98CBD80474FA8B44BF855DF32C47DC35B42A90@smartserver.smartshare.dk> From: "Medvedkin, Vladimir" Message-ID: <1e13c205-70cf-44b2-611d-d5fced5f3020@intel.com> Date: Thu, 12 Sep 2019 10:47:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35B42A90@smartserver.smartshare.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v5 00/12] lib: add RIB and FIB liraries X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Brørup, On 12/09/2019 08:37, Morten Brørup wrote: >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Vladimir Medvedkin >> >> This is heavily reworked version of previous RIB library series: >> https://mails.dpdk.org/archives/dev/2018-April/099492.html >> >> Current lpm implementation while provides really good lookup >> performance has number of problems. >> One of them is very low speed for control plane operations >> such as add or delete a route. >> Another disadvantage is fixed number of bits for userdata >> (24 for v4 and 21 for v6) >> Also it is hard to introduce changes in existing LPM code or add new >> algorithms without breaking ABI. >> >> This patch series tries to solve this problems by: >> Introduce two new libraries - RIB and FIB. >> RIB that is Routing Information Base. >> It implements a control plane struct containing routes in a tree and >> provides fast add/del operations for routes. Also it allows to perform >> fast subtree traversals (i.e. retrieve existing subroutes for a given >> prefix). This structure will be used as a control plane helper >> structure >> for FIB implementation. >> Also it might be used standalone in other different places such as >> bitmaps for example. >> > Great! > > >> Second library is FIB that is Forwarding Information Base. It >> represents >> dataplane related struct and algorithms for longest prefix match. >> Internally it consists of two parts - RIB (control plane ops) and >> implementation for the dataplane tasks. >> Initial version provides two implementations for both ipv4 and ipv6: >> dummy (uses RIB as a dataplane) and DIR24_8 (same as current LPM) >> Due to proposed design it allows to extend FIB with new algorithms in >> future >> (for example DXR, poptrie, etc). > The feedback following here is meant as a comment, not an objection. Feel free to ignore! > > This FIB library is designed for IP based forwarding only. > > How about forwarding based on other criteria? > E.g. the FIB in a standard Ethernet switch is based on VLAN+MAC. > > Such a FIB would probably require a different library, based on a hash structure, and would also require a compare-and-set function callable from the data plane in order to provide wire speed learning. > > So I suggest that the documentation highlights that this FIB library is for IP based forwarding. Optionally also reconsider the name of the library and its functions, structures etc.. Thanks for the feedback. Yes, at the moment FIB has only longest prefix match algorithms. However, it is possible to add different exact match algorithms for VLAN+MAC/MPLS/etc processing. It is always hard to find proper name for library/function/variable, so if you think that fib name is not relevant feel free to suggest better :) > >> From our measurements we saw 10x speedup for control plane operations >> comparing with current LPM library (depending on prefix length >> distribution) >> >> ToDo: >> - introduce new performance measurement app. >> - add documentation. >> - add support into existing examples (l3fwd) >> > > Med venlig hilsen / kind regards > - Morten Brørup -- Regards, Vladimir