From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 0/2] add rte ring reset api and use it to flush a ring by hash Date: Wed, 19 Dec 2018 22:59:04 +0100 Message-ID: <3213509.eEyrQtEzxV@xps> References: <20181212111525.22996-1-gavin.hu@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, nd@arm.com, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, Honnappa.Nagarahalli@arm.com, bruce.richardson@intel.com, Olivier Matz To: Gavin Hu Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id F19AA1B5E1 for ; Wed, 19 Dec 2018 22:59:08 +0100 (CET) In-Reply-To: <20181212111525.22996-1-gavin.hu@arm.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" +Cc Olivier, maintainer of the ring library. 12/12/2018 12:15, Gavin Hu: > V3: Allow experimental API for meson build > > V2: Fix the coding style issue(commit message line too long) > > V1: To flush a ring not in use, dequeue one by one is wasting cpu cycles. > The patch is to just resetting the head and tail indices to save cpu > cycle. > > Gavin Hu (2): > ring: add reset api to flush the ring when not in use > hash: flush the rings instead of dequeuing one by one > > lib/librte_hash/Makefile | 2 +- > lib/librte_hash/meson.build | 3 +++ > lib/librte_hash/rte_cuckoo_hash.c | 11 ++++------- > lib/librte_ring/rte_ring.h | 20 ++++++++++++++++++++ > lib/librte_ring/rte_ring_version.map | 7 +++++++ > 5 files changed, 35 insertions(+), 8 deletions(-)