From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 563F6C422 for ; Wed, 17 Jun 2015 17:31:39 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 17 Jun 2015 08:31:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,633,1427785200"; d="scan'208";a="748412080" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.21]) by orsmga002.jf.intel.com with SMTP; 17 Jun 2015 08:31:36 -0700 Received: by (sSMTP sendmail emulation); Wed, 17 Jun 2015 16:31:35 +0025 Date: Wed, 17 Jun 2015 16:31:35 +0100 From: Bruce Richardson To: Pablo de Lara Message-ID: <20150617153135.GD8208@bricha3-MOBL3> References: <1433514804-7075-1-git-send-email-pablo.de.lara.guarch@intel.com> <1433514804-7075-3-git-send-email-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433514804-7075-3-git-send-email-pablo.de.lara.guarch@intel.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 2/6] hash: replace existing hash library with cuckoo hash implementation 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: Wed, 17 Jun 2015 15:31:39 -0000 On Fri, Jun 05, 2015 at 03:33:20PM +0100, Pablo de Lara wrote: > This patch replaces the existing hash library with another approach, > using the Cuckoo Hash method to resolve collisions (open addressing), > which pushes items from a full bucket when a new entry tries > to be added in it, storing the evicted entry in an alternative location, > using a secondary hash function. > > This gives the user the ability to store more entries when a bucket > is full, in comparison with the previous implementation. > Therefore, the unit test has been updated, as some scenarios have changed > (such as the previous removed restriction). > > Also note that the API has not been changed, although new fields > have been added in the rte_hash structure. > The main change when creating a new table is that the number of entries > per bucket is fixed now, so its parameter is ignored now > (still there to maintain the same parameters structure). > > As a last note, the maximum burst size in lookup_burst function > hash been increased to 64, to improve performance. > > Signed-off-by: Pablo de Lara I'm getting compile errors with icc and clang with this patch. Something to fix in your V2. /home/bruce/dpdk.org/app/test/test_hash.c:567:2: fatal error: array index 5 is past the end of the array (which contains 5 elements) [-Warray-bounds] expected_pos[5] = pos[5]; ^ ~ /home/bruce/dpdk.org/app/test/test_hash.c:548:2: note: array 'expected_pos' declared here int expected_pos[5]; ^ 1 error generated. Further review comments to follow. /Bruce