From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0058.outbound.protection.outlook.com [157.56.112.58]) by dpdk.org (Postfix) with ESMTP id 6E4A55A76 for ; Fri, 17 Jul 2015 05:35:14 +0200 (CEST) Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none; Received: from zhigangTHINK (124.207.145.166) by HE1PR02MB0809.eurprd02.prod.outlook.com (10.161.118.149) with Microsoft SMTP Server (TLS) id 15.1.213.14; Fri, 17 Jul 2015 03:35:10 +0000 From: Tony Lu To: "'De Lara Guarch, Pablo'" , 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> In-Reply-To: Date: Fri, 17 Jul 2015 11:34:38 +0800 Message-ID: <001c01d0c041$98b01c30$ca105490$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AQHQu29EOFIwuy285UGf11xGpF0wDp3dzxKAgADIHeCAAFH/8A== Content-Language: zh-cn X-Originating-IP: [124.207.145.166] X-ClientProxiedBy: SIXPR01CA0046.apcprd01.prod.exchangelabs.com (25.163.105.174) To HE1PR02MB0809.eurprd02.prod.outlook.com (25.161.118.149) X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB0809; 2:tqBNZcbUArb7hvGKY6T2B7GAIkEO/uPrchTh/OEC88OMvmfM7joGcqkDTKCTci0n; 3:dHogasWyMoDbP/1jrmrcF3CVyDfqULGzJMJ4p5vbpf6HmEh2IORmF4zPE4+07aNOxb9UPfWQqPMEWmVSqfRbDHVZqDYE+ciUqx2oPNlAFiehCB3QkR6afUbFlq9NgVfL4UsbJRYkKZFt8XO+R0j1VA==; 25:FoIIRzIjOBY27JjIFzd4/MgiL1Tk5lK1Oiu2YbIH6YMjmQsOutca6+yIWuSwprbYRLs6ACJOAnYFGQwQT2WL2/1gqh2bplye5/d04nuFs+r2dKCcfuksdKbJAMv6rfhjZ56LgNv+OPaDF6MFOW+wbW8yXcPPKjsy4ld7kMqJVtPBogcBXwB5HQDCn3rtkiMFdHn+jGdRLZaX/04+at/EC36LlXoDmsGTuYsX+eSW2uHgYCd7kzVaoMwddGwnHOa9; 20:6er6Ka7mtLEmQ/Z+miTNSNhH0gso+6opxIo1GwZBQpfOc5KPy9v35fg2PUcWciqDkA2eoAsUf97y76ytRFdZG1nroaCaHTx6jVY76CbXTmIPOf5Q6nA8B7nvARc8f6UB2hQFwGUEoBWYs99o5ukfRXUPD/cUk6tuQfDA3hSszTA=; 4:bh4/PthZ8z+hV4YMQ5Lj4968+VWiO2lpMFfEYZ1s711KNYoNVEeg+6GDmPCYHaeeUY5hj8PyzLtB7WNodugYyfsX0ovQko67VDZNYRWdFXWp+XxstKAeCwEMLPbMUynk5bu8+M45hy0R3o9p9PwhuDd0O9ZF899xWnKovIWat02/AqwjDkV62qctd5HDRqAFyB3gNC5y3gp+aVwGkx9QL62W29EdHhB6VK77MDJnhJUvoiCeYSyYFOdMYr4DyueALfyUqkOUAcWacDDGZB3OI9giJPQjhJjC9Gmtd2G+8pE= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR02MB0809; HE1PR02MB0809: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:HE1PR02MB0809; BCL:0; PCL:0; RULEID:; SRVR:HE1PR02MB0809; X-Forefront-PRVS: 06400060E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(13464003)(52604005)(164054003)(377454003)(2656002)(92566002)(59696002)(50986999)(76176999)(107886002)(61296003)(84116002)(87976001)(33646002)(19580405001)(19580395003)(96836002)(33716001)(93886004)(97756001)(66066001)(86362001)(42186005)(40100003)(5001960100002)(46102003)(2950100001)(23726002)(106116001)(122386002)(50226001)(14726001)(5001770100001)(189998001)(50466002)(102836002)(77156002)(77096005)(62966003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR02MB0809; H:zhigangTHINK; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR02MB0809; 23:dE9WRkkXZZt5AXozMpGXvYPQRCJI7ym7tFyNPI5cV?= =?us-ascii?Q?mv2sOeUwEqwiTyRkPdk/5dyPnhVGm8KwpxMfsnWHyX6LbZHlINmuphIvavuE?= =?us-ascii?Q?Bef/F/Kvv/yty2e5oOGvGjUvTB1Qfn+Tx721Aa8GmtZBv1Rgwsjsn5JrIpxI?= =?us-ascii?Q?2DNObbOWtyLnts2RffGbJoOtKxli1vQOoArK6kOXYCFU644LV7N/DcR/hbSF?= =?us-ascii?Q?YynZoAfcJllnjuLC5hTowvTxeQp1TaQf90n0I382LV1I/P72lRcuAplt3+f2?= =?us-ascii?Q?sV3XkeNg+5SrIZnUoHBGv+RPDHE2dHR7AVPQzSdPh2rr+N8TpDynIz5qln2K?= =?us-ascii?Q?S4thXZt000/DjVbu1mxePYncdwXiyl2ZgRymS2e3Cc1gv7SbQQx1cpvtdGW6?= =?us-ascii?Q?PPxFIXrnxCJEYFBKMVVWaEsTwuVoutB+4G0ooBGQBoTux2/xDmhZowXa3PYD?= =?us-ascii?Q?/YhUPgJQ3XyTpCZYtJ5TPEvZQFoFZhjIzO1fwDaRZ8LdKid4mrVW6RzM1dGP?= =?us-ascii?Q?/afZMfuQjxsmjSPhODKb37z18kvdRZlQDH0XL7eT2ww6YQ8ukIcfATpXWNr+?= =?us-ascii?Q?y8Bgd2Iwep6RSOBe9F9mg+TVwGpvXvw8blIcUebms7sZMXaHcejaDmDJwnrH?= =?us-ascii?Q?IiIII+8QCTMXHiyozgntctobwou+9eJCXvUXER51VlJB9CMi2J26K4maB0NA?= =?us-ascii?Q?gValSA7iKtJ0FPkudDkWd8sjRg8n8yBqn0lvIgqWCa2fK46/Tc0EbAwXzJl/?= =?us-ascii?Q?laSi/MhVcSGd2J09dlJl2lzT9qC3NGgrxczGOillZFl1wCB/vZrN7+F4Pm1x?= =?us-ascii?Q?oq+asEo1QvjMzgazGi22YwNk/ap6QHDnRBnChV9PAPPJC3PldfM+3o06eVt+?= =?us-ascii?Q?V/++zf2ZpqJ3C6ATixpV9U1bn0dqCZE4AoGsxE0wEszAZBy0TkWmFkq8KCko?= =?us-ascii?Q?uMoeVHakOO3dg3UsIg2zgyybFC6cnb0gZC5/FiR2xg2b0lnZzSFgh2dWbAWp?= =?us-ascii?Q?m/bUSTp2lXoszpXdVSGpmRuoftC6C3IXJMPC7LLOYLZPRz+m7uQqOTP3ZjOX?= =?us-ascii?Q?nNkDE0=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB0809; 5:0s5sKw5bNyWIpTkyo5K48YIlbrv4XsJwzcOER7ekyxYEE9EBy7j35YWFsXTtLbdqWX1YlEysG3yAr5QUEoOEZDXuXCV7ILTawLdXtwAI++BLqqW2vBY+oszN7iYLwkO7d+ZzBwgJThs0xVHl5eNHtA==; 24:oQ0viPm/4Ou4rp25VxjXrO2g9WeEX8xFlwLYvF4+AB7iKoayYk5kl70YUINO2kev7wGALiT0CDI9UDLpJsxpuOXp2mRUV8jcEvM8Rhgo83E=; 20:ndjeHs/zb5yEBnDlw+XQRo96z3PLpUQU31dICF9kjKExQ7dgyzQeVxGRtO8ovXhU8igOlVf0qAZ8ejUp9FCPfg== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2015 03:35:10.3481 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR02MB0809 Subject: Re: [dpdk-dev] [PATCH v7 1/7] 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: Fri, 17 Jul 2015 03:35:14 -0000 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 . 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 . 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. Thanks -Tony >Thanks, >Pablo >> >> Thanks >> -Zhigang Lu