From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 018D91B29A; Wed, 12 Dec 2018 11:16:03 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2018 02:16:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,344,1539673200"; d="scan'208";a="282955892" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.32]) by orsmga005.jf.intel.com with SMTP; 12 Dec 2018 02:15:59 -0800 Received: by (sSMTP sendmail emulation); Wed, 12 Dec 2018 03:15:59 -0700 Date: Wed, 12 Dec 2018 03:15:59 -0700 From: Bruce Richardson To: Gavin Hu Cc: dev@dpdk.org, nd@arm.com, thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, Honnappa.Nagarahalli@arm.com, stable@dpdk.org Message-ID: <20181212101558.GB28296@bricha3-MOBL.ger.corp.intel.com> References: <20181212062404.30243-1-gavin.hu@arm.com> <20181212064733.1008-1-gavin.hu@arm.com> <20181212064733.1008-3-gavin.hu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181212064733.1008-3-gavin.hu@arm.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v2 2/2] hash: flush the rings instead of dequeuing one by one 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: Wed, 12 Dec 2018 10:16:04 -0000 On Wed, Dec 12, 2018 at 02:47:33PM +0800, Gavin Hu wrote: > Within rte_hash_reset, calling a while loop to dequeue one by > one from the ring, while not using them at all, is wasting cycles, > The patch just flush the ring by resetting the indices can save cpu > cycles. > > Fixes: b26473ff8f4a ("hash: add reset function") > Fixes: 75706568a7eb ("hash: add extendable bucket feature") > Cc: stable@dpdk.org > > Signed-off-by: Gavin Hu > Reviewed-by: Honnappa Nagarahalli > --- > lib/librte_hash/Makefile | 2 +- > lib/librte_hash/rte_cuckoo_hash.c | 11 ++++------- > 2 files changed, 5 insertions(+), 8 deletions(-) > > diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile > index c8c435dfd..5669d83f4 100644 > --- a/lib/librte_hash/Makefile > +++ b/lib/librte_hash/Makefile > @@ -6,7 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk > # library name > LIB = librte_hash.a > > -CFLAGS += -O3 > +CFLAGS += -O3 -DALLOW_EXPERIMENTAL_API > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) > LDLIBS += -lrte_eal -lrte_ring > Is a similar change needed to meson.build?