From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 4B3741BEAE for ; Fri, 6 Jul 2018 12:56:30 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2018 03:56:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,315,1526367600"; d="scan'208";a="238297852" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by orsmga005.jf.intel.com with SMTP; 06 Jul 2018 03:56:27 -0700 Received: by (sSMTP sendmail emulation); Fri, 06 Jul 2018 11:56:26 +0100 Date: Fri, 6 Jul 2018 11:56:26 +0100 From: Bruce Richardson To: Alex Kiselev Cc: "dev@dpdk.org" Message-ID: <20180706105625.GD6220@bricha3-MOBL.ger.corp.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.0 (2018-05-17) Subject: Re: [dpdk-dev] [PATCH v2] librte_lpm: Improve performance of the delete and add functions 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: , X-List-Received-Date: Fri, 06 Jul 2018 10:56:30 -0000 On Mon, Jul 02, 2018 at 07:42:11PM +0300, Alex Kiselev wrote: > There are two major problems with the library: > first, there is no need to rebuild the whole LPM tree > when a rule is deleted and second, due to the current > rules algorithm with complexity O(n) it's almost > impossible to deal with large rule sets (50k or so rules). > This patch addresses those two issues. > > Signed-off-by: Alex Kiselev > --- > lib/librte_lpm/rte_lpm6.c | 1073 ++++++++++++++++++++++++++++++++++----------- > 1 file changed, 816 insertions(+), 257 deletions(-) > The lpm6_autotest is now giving me an error when I run it, which wasn't there before, though interestingly the test is still passing overall, which seems wrong: RTE>>lpm6_autotest # test 00 # test 01 LPM: LPM rules mempool allocation failed: Unknown error 17 (17)# test 02 # test 03 ... On the other hand, the performance numbers, especially for delete, look far better: Before: Average LPM Add: 531220 cycles Average LPM Lookup: 41.7 cycles (fails = 0.0%) BULK LPM Lookup: 33.8 cycles (fails = 0.0%) Average LPM Delete: 1.41825e+08 cycles After: Average LPM Add: 487116 cycles Average LPM Lookup: 41.7 cycles (fails = 0.0%) BULK LPM Lookup: 33.3 cycles (fails = 0.0%) Average LPM Delete: 3.65125e+06 cycles /Bruce