From mboxrd@z Thu Jan 1 00:00:00 1970 From: "De Lara Guarch, Pablo" Subject: Re: [PATCH v7 1/7] hash: replace existing hash library with cuckoo hash implementation Date: Thu, 16 Jul 2015 20:42:06 +0000 Message-ID: References: <1436571020-16252-1-git-send-email-pablo.de.lara.guarch@intel.com> <1436573936-15956-1-git-send-email-pablo.de.lara.guarch@intel.com> <1436573936-15956-2-git-send-email-pablo.de.lara.guarch@intel.com> <001601d0bfab$6c4071e0$44c155a0$@com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: Tony Lu , "dev@dpdk.org" Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 4186C5A71 for ; Thu, 16 Jul 2015 22:42:09 +0200 (CEST) In-Reply-To: <001601d0bfab$6c4071e0$44c155a0$@com> Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Tony, > -----Original Message----- > From: Tony Lu [mailto:zlu@ezchip.com] > Sent: Thursday, July 16, 2015 10:40 AM > To: De Lara Guarch, Pablo; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v7 1/7] hash: replace existing hash librar= y > with cuckoo hash implementation >=20 > >diff --git a/lib/librte_hash/rte_cuckoo_hash.c > b/lib/librte_hash/rte_cuckoo_hash.c > >new file mode 100644 > >index 0000000..50e3acd > >--- /dev/null > >+++ b/lib/librte_hash/rte_cuckoo_hash.c > >@@ -0,0 +1,1027 @@ > ... > >+ > >+/* Functions to compare multiple of 16 byte keys (up to 128 bytes) */ > >+static int > >+rte_hash_k16_cmp_eq(const void *key1, const void *key2, size_t key_len > >__rte_unused) > >+{ > >+ const __m128i k1 =3D _mm_loadu_si128((const __m128i *) key1); > >+ const __m128i k2 =3D _mm_loadu_si128((const __m128i *) key2); > >+ const __m128i x =3D _mm_xor_si128(k1, k2); > >+ > >+ return !_mm_test_all_zeros(x, x); > >+} > ... >=20 > When compiling the latest dev DPDK for non-x86 arch, it fails on the abov= e > code, > as the SSE is x86 specific defined in . Is it possible to > replace this > function with platform independent code? Thanks for spotting this. I just sent a patch that should fix the problem. Can you check if it works? Thanks, Pablo >=20 > Thanks > -Zhigang Lu