From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: rte_hash thread safe Date: Tue, 24 Apr 2018 12:07:09 +0100 Message-ID: <20180424110708.GB124204@bricha3-MOBL.ger.corp.intel.com> References: <2601191342CEEE43887BDE71AB977258AEA5206E@IRSMSX102.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Honnappa Nagarahalli , Brijesh Singh , "dev@dpdk.org" , nd To: "Ananyev, Konstantin" Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 65402E07 for ; Tue, 24 Apr 2018 13:07:14 +0200 (CEST) Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB977258AEA5206E@IRSMSX102.ger.corp.intel.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" On Tue, Apr 24, 2018 at 11:03:42AM +0000, Ananyev, Konstantin wrote: > > > > > > A gentle reminder, > > > > I am curious to know if/how rte_hash is thread safe for lookups.It is not obvious to me how following code is thread safe: > > I don't think it is really thread-safe: you can't do lookup and add/delete simultaneously from different threads. > Some extra synchronization would be needed. > Konstantin > This notice may be a left-over from older versions. I believe in the past, the hash library used to be safe to have add/delete and lookup in parallel, but it certainly appears to be no longer the case. /Bruce