From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by dpdk.org (Postfix) with ESMTP id 5FCE7567C for ; Fri, 23 Oct 2015 21:13:36 +0200 (CEST) Received: by lffz202 with SMTP id z202so94264812lff.3 for ; Fri, 23 Oct 2015 12:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IMYENx5lZJA6FVAxtRNYe/ALwYwmsj70Ldt/JCen+Wg=; b=jG1LJMw7Cemydqi3jwjGtXFIkHZLLZ5HSO2h+Fsm43LSD+S8icX7KRSqkF/v2RmclZ RjcxdgMTvZStH87kEpfJ7f61fJaE3rOu3CeeiIQaYSoj1qLYsZ/hHKt09iZMrOQmUJqt suB9Du6HvWsB2+YEPJSTFxHTdynZZWQJF+vJlzaCnIZftkY6VK7XgeHkKUpTiSkzR1gi b+XaPsFQzAtUst/7Vz0No27emOM8v/gPEELUat2hQv7Yt8u/tWDcMhd/S3cVFas1z6XZ jVYDKIUk7RML5DYUq/cPKaAJVCwbK3E49tKS60+MqoMlMxuWUsJNfypwV+cwy6Xh0ovY flUg== MIME-Version: 1.0 X-Received: by 10.112.156.193 with SMTP id wg1mr11717773lbb.24.1445627616013; Fri, 23 Oct 2015 12:13:36 -0700 (PDT) Received: by 10.114.199.4 with HTTP; Fri, 23 Oct 2015 12:13:35 -0700 (PDT) In-Reply-To: <20151023183811.GA11859@mhcomputing.net> References: <1445608311-8092-1-git-send-email-michalx.k.jastrzebski@intel.com> <20151023162033.GA10036@mhcomputing.net> <20151023093305.2e971298@xeon-e3> <20151023183811.GA11859@mhcomputing.net> Date: Fri, 23 Oct 2015 22:13:35 +0300 Message-ID: From: Vladimir Medvedkin To: Matthew Hall Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v1 0/3] lpm: increase number of next hops for lpm (ipv4) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2015 19:13:36 -0000 Hi all, I also have LPM library implementation. Main points: - First, we don't need two separate structures rte_lpm_tbl8_entry and rte_lpm_tbl24_entry. I think it's better to merge in one rte_lpm_tbl_entry because there is only one difference in name of one bit - valid_group vs ext_entry. Let it's name will be ext_valid. - Second, I think that 16 bit is more than enough for next-hop index. It's better to use remaining 8 bits for so called forwarding class. It is something like Juniper DCU that can help us to classify traffic based on dst prefix. But after conversation with Bruce Richardson I agree with him that next-hop index and forwarding class can be split from one return value by the application. - Third, I want to add posibility to lookup AS number (or any other 4 byte) that originate that prefix. It can be defined like: union rte_lpm_tbl_entry_extend { #ifdef RTE_LPM_ASNUM uint64_t entry; #else uint32_t entry; #endif #ifdef RTE_LPM_ASNUM uint32_t as_num; #endif struct{ uint32_t next_hop :24;/**< next hop. */ uint32_t valid :1; /**< Validation flag. */ uint32_t ext_valid :1; /**< External entry. */ uint32_t depth :6; /**< Rule depth. */ }; }; - Fourth, extension of next-hop index is done not only for increasing of next-hops but also to increase more specific routes. So I think that should be fixed + unsigned tbl8_index = (uint8_t)ip + + ((uint8_t)tbl_entry * RTE_LPM_TBL8_GROUP_NUM_ENTRIES); Regards, Vladimir 2015-10-23 21:38 GMT+03:00 Matthew Hall : > On Fri, Oct 23, 2015 at 09:33:05AM -0700, Stephen Hemminger wrote: > > On Fri, 23 Oct 2015 09:20:33 -0700 > > Matthew Hall wrote: > > > > > On Fri, Oct 23, 2015 at 03:51:48PM +0200, Michal Jastrzebski wrote: > > > > From: Michal Kobylinski > > > > > > > > The current DPDK implementation for LPM for IPv4 and IPv6 limits the > > > > number of next hops to 256, as the next hop ID is an 8-bit long > field. > > > > Proposed extension increase number of next hops for IPv4 to 2^24 and > > > > also allows 32-bits read/write operations. > > > > > > > > This patchset requires additional change to rte_table library to meet > > > > ABI compatibility requirements. A v2 will be sent next week. > > > > > > I also have a patchset for this. > > > > > > I will send it out as well so we could compare. > > > > > > Matthew. > > > > Could you consider rolling in the Brocade/Vyatta changes to LPM > > structure as well. Would prefer only one ABI change > > Hi Stephen, > > I asked you if you could send me these a while ago but I never heard > anything. > > That's the only reason I made my own version. > > If you have them available also maybe we can consolidate things. > > Matthew. >