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 333174F9B for ; Fri, 26 Oct 2018 13:09:38 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Oct 2018 04:09:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,427,1534834800"; d="scan'208";a="98905677" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by fmsmga002.fm.intel.com with SMTP; 26 Oct 2018 04:09:34 -0700 Received: by (sSMTP sendmail emulation); Fri, 26 Oct 2018 12:09:33 +0100 Date: Fri, 26 Oct 2018 12:09:32 +0100 From: Bruce Richardson To: "Wang, Yipeng1" Cc: Honnappa Nagarahalli , "stephen@networkplumber.org" , "dev@dpdk.org" , "Gobriel, Sameh" , nd Message-ID: <20181026110932.GC14620@bricha3-MOBL.ger.corp.intel.com> References: <1540404570-102126-1-git-send-email-yipeng1.wang@intel.com> <1540404570-102126-2-git-send-email-yipeng1.wang@intel.com> 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.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v2 1/4] hash: fix unnecessary pause 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, 26 Oct 2018 11:09:38 -0000 On Fri, Oct 26, 2018 at 03:04:12AM +0100, Wang, Yipeng1 wrote: > >-----Original Message----- > >From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli@arm.com] > >> --- > >> lib/librte_hash/rte_cuckoo_hash.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/lib/librte_hash/rte_cuckoo_hash.c > >> b/lib/librte_hash/rte_cuckoo_hash.c > >> index 0648a22..4a2647e 100644 > >> --- a/lib/librte_hash/rte_cuckoo_hash.c > >> +++ b/lib/librte_hash/rte_cuckoo_hash.c > >> @@ -574,14 +574,14 @@ rte_hash_reset(struct rte_hash *h) > >> > >> /* clear the free ring */ > >> while (rte_ring_dequeue(h->free_slots, &ptr) == 0) > >> - rte_pause(); > >> + continue; > >Minor comment: 'continue' can be removed. > > > [Wang, Yipeng] I did not find a pretty way to do it without coding style warning, e.g. add semicolon in same line... > Anyone know a common way to do it in DPDK? > Semi-colon on a new line, possibly with comment should work ok. However, the continue is harmless, so I'm ok with it as-is.