From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 17D99B3B1 for ; Thu, 18 Sep 2014 17:25:57 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 18 Sep 2014 08:22:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="388106614" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by FMSMGA003.fm.intel.com with ESMTP; 18 Sep 2014 08:26:06 -0700 Received: from irsmsx110.ger.corp.intel.com (163.33.3.25) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 18 Sep 2014 16:31:35 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.157]) by IRSMSX110.ger.corp.intel.com ([169.254.15.149]) with mapi id 14.03.0195.001; Thu, 18 Sep 2014 16:31:34 +0100 From: "De Lara Guarch, Pablo" To: Neil Horman Thread-Topic: [dpdk-dev] [PATCH 0/3] New Thread Safe Hash Library Thread-Index: AQHP0yxIp6y0Y9n4+kWZMhvxAIc7j5wGvwmAgABDJ2A= Date: Thu, 18 Sep 2014 15:31:34 +0000 Message-ID: References: <1411036471-3822-1-git-send-email-pablo.de.lara.guarch@intel.com> <20140918122129.GD20389@hmsreliant.think-freely.org> In-Reply-To: <20140918122129.GD20389@hmsreliant.think-freely.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 0/3] New Thread Safe Hash Library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 15:25:58 -0000 Hi Neil, > -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Thursday, September 18, 2014 1:21 PM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 0/3] New Thread Safe Hash Library >=20 > On Thu, Sep 18, 2014 at 11:34:28AM +0100, Pablo de Lara wrote: > > This is an alternative hash implementation to the existing hash library= . > > This patch set provides a thread safe hash implementation, it allows us= ers > > to use multiple readers/writers working on a same hash table. > > Main differences between the previous and the new implementation are: > > > > - Multiple readers/writers can work on the same hash table, > > whereas in the previous implementation writers could not work > > on the table at the same time readers do. > > - Previous implementation returned an index to a table after a lookup. > > This implementation returns 8-byte integers or pointers to external d= ata. > > - Maximum entries to be looked up in bursts is 64, instead of 16. > > - Maximum key length has being increased to 128, instead of a maximum o= f > 64. > > > > Basic implementation: > > > > - A sparse table containing buckets (64-byte long) with hashes, > > most of which are empty, and indexes to the second table. > > - A compact table containing keys for final matching, > > plus data associated to them. > > > Thread safe hash tables seem to me like a configuration option rather tha= n a > new > library. Instead of creating a whole new library (with a new API and ABI= to > maintain, why not just add thread safety as a configurable option to the > existing hash library. That saves code space in the DPDK, and reduces > application complexity (as the same api is useable for thread safe and un= safe > hash tables) Makes sense, but implementation has changed so much to add it directly into= the existing library. At first, this was designed to be a replacement of the existing library,=20 but since API is a bit different from the old one, it was thought to leave = it as an alternative, so users are not forced to have to change their applications if they don't= want to use thread safe hash tables. >=20 > Neil