From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C56D398 for ; Wed, 8 Feb 2017 17:19:57 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 08 Feb 2017 08:19:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,348,1477983600"; d="scan'208";a="931572887" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga003.jf.intel.com with ESMTP; 08 Feb 2017 08:19:55 -0800 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Feb 2017 16:19:55 +0000 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.173]) by irsmsx111.ger.corp.intel.com ([169.254.2.109]) with mapi id 14.03.0248.002; Wed, 8 Feb 2017 16:19:55 +0000 From: "De Lara Guarch, Pablo" To: "Bar, Nir" , "users@dpdk.org" Thread-Topic: rte_hash_hash in DPDK2.0 Thread-Index: AdKB+dDXSp7f0BFKTEOjeZIAbwcSBwALTgPA Date: Wed, 8 Feb 2017 16:19:54 +0000 Message-ID: References: <33C55E1E4B8F6F44A79984DB4C8FD76DF35E5A54@TLVMBX2.verint.corp.verintsystems.com> In-Reply-To: <33C55E1E4B8F6F44A79984DB4C8FD76DF35E5A54@TLVMBX2.verint.corp.verintsystems.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjkwY2NlYzItZDFjNi00NWUxLTk3ODctZWZjYmE2MGU2ODU4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ijhpekh1WWgzeko5NFJROUlrUVdVcHJWUjBtdEpEaHdDa3I1S1wvSVZxSFdrPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] rte_hash_hash in DPDK2.0 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2017 16:19:58 -0000 Hi Nir, > -----Original Message----- > From: users [mailto:users-bounces@dpdk.org] On Behalf Of Bar, Nir > Sent: Wednesday, February 08, 2017 10:55 AM > To: users@dpdk.org > Subject: [dpdk-users] rte_hash_hash in DPDK2.0 >=20 > Hi, >=20 > Why rte_has_hash() in DPDK-2.0 isn't multi thread safe? >=20 > It only calculates hash. >=20 Rte_hash_hash is multi-thread safe, but not multi-process safe, as it uses = a function pointer to get the actual hash function. Thanks, Pablo > Thanks, > Nir >=20 >=20 > ** > * Calc a hash value by key. This operation is not multi-process safe. > * > * @param h > * Hash table to look in. > * @param key > * Key to find. > * @return > * - hash value > */ > static inline hash_sig_t > rte_hash_hash(const struct rte_hash *h, const void *key) > { > /* calc hash result by key */ > return h->hash_func(key, h->key_len, h->hash_func_init_val= ); > } >=20 > -- > This electronic message may contain proprietary and confidential > information of Verint Systems Inc., its affiliates and/or subsidiaries. > The information is intended to be for the use of the individual(s) or > entity(ies) named above. If you are not the intended recipient (or > authorized to receive this e-mail for the intended recipient), you may no= t > use, copy, disclose or distribute to anyone this message or any informati= on > contained in this message. If you have received this electronic message i= n > error, please notify us by replying to this e-mail.