From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2018 04:07:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,322,1520924400"; d="scan'208";a="40039367" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.51]) by fmsmga002.fm.intel.com with SMTP; 24 Apr 2018 04:07:11 -0700 Received: by (sSMTP sendmail emulation); Tue, 24 Apr 2018 12:07:09 +0100 Date: Tue, 24 Apr 2018 12:07:09 +0100 From: Bruce Richardson To: "Ananyev, Konstantin" Cc: Honnappa Nagarahalli , Brijesh Singh , "dev@dpdk.org" , nd 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 Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB977258AEA5206E@IRSMSX102.ger.corp.intel.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] rte_hash thread safe 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: Tue, 24 Apr 2018 11:07:14 -0000 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