All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Tony Lu <zlu@ezchip.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH v7 1/7] hash: replace existing hash library with cuckoo hash implementation
Date: Fri, 17 Jul 2015 09:06:28 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D897272D8A1C@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <000201d0c066$608af120$21a0d360$@com>

Hi Tony,

> -----Original Message-----
> From: Tony Lu [mailto:zlu@ezchip.com]
> Sent: Friday, July 17, 2015 8:58 AM
> To: De Lara Guarch, Pablo; dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v7 1/7] hash: replace existing hash library
> with cuckoo hash implementation
> 
> >-----Original Message-----
> >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com]
> >Sent: Friday, July 17, 2015 3:35 PM
> >To: Tony Lu; dev@dpdk.org
> >Subject: RE: [dpdk-dev] [PATCH v7 1/7] hash: replace existing hash library
> with
> >cuckoo hash implementation
> >
> >
> >
> >> -----Original Message-----
> >> From: Tony Lu [mailto:zlu@ezchip.com]
> >> Sent: Friday, July 17, 2015 4:35 AM
> >> To: De Lara Guarch, Pablo; dev@dpdk.org
> >> Subject: RE: [dpdk-dev] [PATCH v7 1/7] hash: replace existing hash
> >> library with cuckoo hash implementation
> >>
> >> Hi, Pablo
> >>
> >> >-----Original Message-----
> >> >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com]
> >> >Sent: Friday, July 17, 2015 4:42 AM
> >> >To: Tony Lu; dev@dpdk.org
> >> >Subject: RE: [dpdk-dev] [PATCH v7 1/7] hash: replace existing hash
> >> >library
> >> with
> >> >cuckoo hash implementation
> >> >
> >> >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
> >> >> library with cuckoo hash implementation
> >> >>
> >> >> >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 = _mm_loadu_si128((const __m128i *)
> key1);
> >> >> >+	const __m128i k2 = _mm_loadu_si128((const __m128i *)
> key2);
> >> >> >+	const __m128i x = _mm_xor_si128(k1, k2);
> >> >> >+
> >> >> >+	return !_mm_test_all_zeros(x, x); }
> >> >> ...
> >> >>
> >> >> When compiling the latest dev DPDK for non-x86 arch, it fails on
> >> >> the above code, as the SSE is x86 specific defined in
> >> >> <emmintrin.h>.  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 for your quick response, but __m128i and all the _mm_ related
> >> functions are X86 specific defined in <emmintrin.h>.  This header file
> >> is only available in X86 compiler library, but no-X86 archs do not
> >> have this file.  So if we can replace all the X86 specific code in the
> >> above function, that would be great.
> >>
> >With the patch that I sent, if you are compiling for a non-x86 arch, you
> should
> >not have any problem, since all that code will only be used if using x86
> arch.
> >Have you tried compiling DPDK with the patch?
> 
> Yes, I have built the DPDK with your patch, and got the following errors.
> This is
> because there are no __m128i, _mm_loadu_si128(), _mm_cmpeq_epi32()
> and
> _mm_movemask_epi8() on no-X86 arches.
> 
> == Build lib/librte_hash
>   CC rte_cuckoo_hash.o
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c: In function
> 'rte_hash_k16_cmp_eq':
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1126: error:
> expected '=', ',', ';', 'asm' or '__attribute__' before 'k1'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1126: error: 'k1'
> undeclared (first use in this function)
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1126: error: (Each
> undeclared identifier is reported only once
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1126: error: for
> each function it appears in.)
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1126: warning:
> implicit declaration of function '_mm_loadu_si128'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1126: warning:
> nested extern declaration of '_mm_loadu_si128'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1126: error:
> expected ')' before '__m128i'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1126: warning:
> type defaults to 'int' in declaration of 'type name'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1126: warning:
> cast from pointer to integer of different size
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1127: error:
> expected '=', ',', ';', 'asm' or '__attribute__' before 'k2'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1127: error: 'k2'
> undeclared (first use in this function)
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1127: error:
> expected ')' before '__m128i'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1127: warning:
> type defaults to 'int' in declaration of 'type name'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1127: warning:
> cast from pointer to integer of different size
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1133: error:
> expected '=', ',', ';', 'asm' or '__attribute__' before 'x'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1133: error: 'x'
> undeclared (first use in this function)
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1133: warning:
> implicit declaration of function '_mm_cmpeq_epi32'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1133: warning:
> nested extern declaration of '_mm_cmpeq_epi32'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1135: warning:
> implicit declaration of function '_mm_movemask_epi8'
> /u/zlu.bjg/git/dpdk.org/lib/librte_hash/rte_cuckoo_hash.c:1135: warning:
> nested extern declaration of '_mm_movemask_epi8'
> make[3]: *** [rte_cuckoo_hash.o] Error 1
> make[2]: *** [librte_hash] Error 2
> make[1]: *** [lib] Error 2
> make: *** [all] Error 2

Looking at the snippet, I would say the patch has not been applied
(did you apply the patch hash: "fix compilation for non-x86 systems"?),
because looking at the lines where it is failing, they are the old lines in rte_cuckoo_hash.c,
which have been moved to another file (and should not be included for you).

Pablo
> 
> Thanks
> -Tony
> 
> >Pablo
> >
> >> Thanks
> >> -Tony
> >>
> >>
> >> >Thanks,
> >> >Pablo
> >> >>
> >> >> Thanks
> >> >> -Zhigang Lu
> >>
> 

  reply	other threads:[~2015-07-17  9:06 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 14:33 [PATCH 0/6] Cuckoo hash Pablo de Lara
2015-06-05 14:33 ` [PATCH 1/6] eal: add const in prefetch functions Pablo de Lara
2015-06-16 15:10   ` Bruce Richardson
2015-06-05 14:33 ` [PATCH 2/6] hash: replace existing hash library with cuckoo hash implementation Pablo de Lara
2015-06-17 15:31   ` Bruce Richardson
2015-06-18  9:50   ` Bruce Richardson
2015-06-05 14:33 ` [PATCH 3/6] hash: add new lookup_bulk_with_hash function Pablo de Lara
2015-06-05 14:33 ` [PATCH 4/6] hash: add new functions rte_hash_rehash and rte_hash_reset Pablo de Lara
2015-06-05 14:33 ` [PATCH 5/6] hash: add new functionality to store data in hash table Pablo de Lara
2015-06-05 14:33 ` [PATCH 6/6] MAINTAINERS: claim responsability for hash library Pablo de Lara
2015-06-16 13:44 ` [PATCH 0/6] Cuckoo hash Thomas Monjalon
2015-06-16 21:44   ` De Lara Guarch, Pablo
2015-06-25 22:05 ` [PATCH v2 00/11] " Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 01/11] eal: add const in prefetch functions Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 02/11] hash: move rte_hash structure to C file and make it internal Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 03/11] test/hash: enhance hash unit tests Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 04/11] test/hash: rename new hash perf unit test back to original name Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 05/11] hash: replace existing hash library with cuckoo hash implementation Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 06/11] hash: add new lookup_bulk_with_hash function Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 07/11] hash: add new function rte_hash_reset Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 08/11] hash: add new functionality to store data in hash table Pablo de Lara
2015-06-26 16:49     ` Stephen Hemminger
2015-06-28 22:23       ` De Lara Guarch, Pablo
2015-06-30  7:36         ` Stephen Hemminger
2015-07-10 10:39         ` Bruce Richardson
2015-06-25 22:05   ` [PATCH v2 09/11] MAINTAINERS: claim responsability for hash library Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 10/11] doc: announce ABI change of librte_hash Pablo de Lara
2015-06-25 22:05   ` [PATCH v2 11/11] doc: update hash documentation Pablo de Lara
2015-06-28 22:25   ` [PATCH v3 00/11] Cuckoo hash Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 01/11] eal: add const in prefetch functions Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 02/11] hash: move rte_hash structure to C file and make it internal Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 03/11] test/hash: enhance hash unit tests Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 04/11] test/hash: rename new hash perf unit test back to original name Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 05/11] hash: replace existing hash library with cuckoo hash implementation Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 06/11] hash: add new lookup_bulk_with_hash function Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 07/11] hash: add new function rte_hash_reset Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 08/11] hash: add new functionality to store data in hash table Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 09/11] MAINTAINERS: claim responsability for hash library Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 10/11] doc: announce ABI change of librte_hash Pablo de Lara
2015-06-28 22:25     ` [PATCH v3 11/11] doc: update hash documentation Pablo de Lara
2015-07-08 23:23     ` [PATCH v3 00/11] Cuckoo hash Thomas Monjalon
2015-07-09  8:02       ` Bruce Richardson
2015-07-10 17:24     ` [PATCH v4 0/7] Cuckoo hash - part 3 of " Pablo de Lara
2015-07-10 17:24       ` [PATCH v4 1/7] hash: replace existing hash library with cuckoo hash implementation Pablo de Lara
2015-07-10 17:24       ` [PATCH v4 2/7] hash: add new function rte_hash_reset Pablo de Lara
2015-07-10 17:24       ` [PATCH v4 3/7] hash: add new functionality to store data in hash table Pablo de Lara
2015-07-10 17:24       ` [PATCH v4 4/7] hash: add iterate function Pablo de Lara
2015-07-10 17:24       ` [PATCH v4 5/7] MAINTAINERS: claim responsability for hash library Pablo de Lara
2015-07-10 17:24       ` [PATCH v4 6/7] doc: announce ABI change of librte_hash Pablo de Lara
2015-07-10 17:24       ` [PATCH v4 7/7] doc: update hash documentation Pablo de Lara
2015-07-10 20:52       ` [PATCH v4 0/7] Cuckoo hash - part 3 of Cuckoo hash Bruce Richardson
2015-07-10 21:57       ` [PATCH v5 " Pablo de Lara
2015-07-10 21:57         ` [PATCH v5 1/7] hash: replace existing hash library with cuckoo hash implementation Pablo de Lara
2015-07-10 21:57         ` [PATCH v5 2/7] hash: add new function rte_hash_reset Pablo de Lara
2015-07-10 21:57         ` [PATCH v5 3/7] hash: add new functionality to store data in hash table Pablo de Lara
2015-07-10 21:57         ` [PATCH v5 4/7] hash: add iterate function Pablo de Lara
2015-07-10 21:57         ` [PATCH v5 5/7] MAINTAINERS: claim responsability for hash library Pablo de Lara
2015-07-10 21:57         ` [PATCH v5 6/7] doc: announce ABI change of librte_hash Pablo de Lara
2015-07-10 21:57         ` [PATCH v5 7/7] doc: update hash documentation Pablo de Lara
2015-07-10 22:52         ` [PATCH v5 0/7] Cuckoo hash - part 3 of Cuckoo hash Bruce Richardson
2015-07-10 23:30         ` [PATCH v6 " Pablo de Lara
2015-07-10 23:30           ` [PATCH v6 1/7] hash: replace existing hash library with cuckoo hash implementation Pablo de Lara
2015-07-10 23:30           ` [PATCH v6 2/7] hash: add new function rte_hash_reset Pablo de Lara
2015-07-10 23:30           ` [PATCH v6 3/7] hash: add new functionality to store data in hash table Pablo de Lara
2015-07-10 23:30           ` [PATCH v6 4/7] hash: add iterate function Pablo de Lara
2015-07-10 23:30           ` [PATCH v6 5/7] MAINTAINERS: claim responsability for hash library Pablo de Lara
2015-07-10 23:30           ` [PATCH v6 6/7] doc: announce ABI change of librte_hash Pablo de Lara
2015-07-10 23:30           ` [PATCH v6 7/7] doc: update hash documentation Pablo de Lara
2015-07-11  0:18           ` [PATCH v7 0/7] Cuckoo hash - part 3 of Cuckoo hash Pablo de Lara
2015-07-11  0:18             ` [PATCH v7 1/7] hash: replace existing hash library with cuckoo hash implementation Pablo de Lara
2015-07-12 22:29               ` Thomas Monjalon
2015-07-13 16:11                 ` Bruce Richardson
2015-07-13 16:14                   ` Bruce Richardson
2015-07-13 16:20                     ` Thomas Monjalon
2015-07-13 16:26                       ` Bruce Richardson
2015-07-16  9:39               ` Tony Lu
2015-07-16 20:42                 ` De Lara Guarch, Pablo
2015-07-17  3:34                   ` Tony Lu
2015-07-17  7:34                     ` De Lara Guarch, Pablo
2015-07-17  7:58                       ` Tony Lu
2015-07-17  9:06                         ` De Lara Guarch, Pablo [this message]
2015-07-17 14:39                           ` Tony Lu
2015-07-11  0:18             ` [PATCH v7 2/7] hash: add new function rte_hash_reset Pablo de Lara
2015-07-12 22:16               ` Thomas Monjalon
2015-07-11  0:18             ` [PATCH v7 3/7] hash: add new functionality to store data in hash table Pablo de Lara
2015-07-12 22:00               ` Thomas Monjalon
2015-07-11  0:18             ` [PATCH v7 4/7] hash: add iterate function Pablo de Lara
2015-07-11  0:18             ` [PATCH v7 5/7] MAINTAINERS: claim responsability for hash library Pablo de Lara
2015-07-11  0:18             ` [PATCH v7 6/7] doc: announce ABI change of librte_hash Pablo de Lara
2015-07-12 22:38               ` Thomas Monjalon
2015-07-11  0:18             ` [PATCH v7 7/7] doc: update hash documentation Pablo de Lara
2015-07-12 22:46             ` [PATCH v7 0/7] Cuckoo hash - part 3 of Cuckoo hash Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E115CCD9D858EF4F90C690B0DCB4D897272D8A1C@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=dev@dpdk.org \
    --cc=zlu@ezchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.