From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 41A071BDD1 for ; Fri, 6 Jul 2018 12:24:37 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2018 03:24:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,315,1526367600"; d="scan'208";a="243104778" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by fmsmga005.fm.intel.com with SMTP; 06 Jul 2018 03:23:58 -0700 Received: by (sSMTP sendmail emulation); Fri, 06 Jul 2018 11:23:57 +0100 Date: Fri, 6 Jul 2018 11:23:57 +0100 From: Bruce Richardson To: Alex Kiselev Cc: "dev@dpdk.org" Message-ID: <20180706102356.GB6220@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:24:37 -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(-) > > diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c > index 149677eb1..438db0831 100644 > --- a/lib/librte_lpm/rte_lpm6.c > +++ b/lib/librte_lpm/rte_lpm6.c > @@ -21,6 +21,10 @@ > #include > #include > #include > +#include > +#include > +#include > +#include For correct compilation, you now need to specify the dependency on the hash and mempool libraries in both make and meson build files. I believe something like this should do the trick: --- a/lib/Makefile +++ b/lib/Makefile @@ -47,7 +47,7 @@ DEPDIRS-librte_hash := librte_eal librte_ring DIRS-$(CONFIG_RTE_LIBRTE_EFD) += librte_efd DEPDIRS-librte_efd := librte_eal librte_ring librte_hash DIRS-$(CONFIG_RTE_LIBRTE_LPM) += librte_lpm -DEPDIRS-librte_lpm := librte_eal +DEPDIRS-librte_lpm := librte_eal librte_mempool librte_hash DIRS-$(CONFIG_RTE_LIBRTE_ACL) += librte_acl DEPDIRS-librte_acl := librte_eal DIRS-$(CONFIG_RTE_LIBRTE_MEMBER) += librte_member --- a/lib/librte_lpm/meson.build +++ b/lib/librte_lpm/meson.build @@ -7,3 +7,4 @@ headers = files('rte_lpm.h', 'rte_lpm6.h') # since header files have different names, we can install all vector headers # without worrying about which architecture we actually need headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h') +deps += ['mempool', 'hash']