From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgw.gov.kz (mgw.gov.kz [89.218.88.242]) by dpdk.org (Postfix) with ESMTP id 5EEF17F6D for ; Fri, 14 Nov 2014 08:05:58 +0100 (CET) Received: from mgw.gov.kz (mx.ctsat.kz [178.89.4.95]) by mgw.gov.kz with ESMTP id sAE7Fuch004081-sAE7Fucj004081 (version=TLSv1.0 cipher=AES128-SHA bits=128 verify=NO); Fri, 14 Nov 2014 13:15:56 +0600 Received: from EXCASHUB1.rgp.local (192.168.40.51) by EdgeForefront.rgp.local (192.168.40.59) with Microsoft SMTP Server (TLS) id 14.2.247.3; Fri, 14 Nov 2014 13:15:48 +0600 Received: from [192.168.35.15] (192.168.35.15) by excashub1.rgp.local (192.168.40.48) with Microsoft SMTP Server (TLS) id 14.2.247.3; Fri, 14 Nov 2014 13:15:57 +0600 Message-ID: <5465AC00.1070602@sts.kz> Date: Fri, 14 Nov 2014 13:15:12 +0600 From: Yerden Zhumabekov User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Neil Horman , Thomas Monjalon References: <1409724351-23786-1-git-send-email-e_zhumabekov@sts.kz> <2916837.QJI9btJm0N@xps13> <20141114005211.GC14230@localhost.localdomain> In-Reply-To: <20141114005211.GC14230@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [192.168.35.15] X-FEAS-SYSTEM-WL: e_zhumabekov@sts.kz Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 0/2] rewritten rte_hash_crc() call 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, 14 Nov 2014 07:05:58 -0000 14.11.2014 6:52, Neil Horman =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > On Thu, Nov 13, 2014 at 06:33:14PM +0100, Thomas Monjalon wrote: >> Any comment on these patches? >> >> 2014-09-03 12:05, Yerden Zhumabekov: >>> As SSE4.2 provides CRC32 instructions with either 32 and 64 bit opera= nds, >>> new rte_hash_crc_8byte() call assisted with _mm_crc32_u64 intrinsic m= ay be >>> useful. >>> >>> ... ... >> > Yeah, sorry I didn't speak up earlier. I meant to ask if the __mm_crc_= u64 > intrinsic will emit software emulated versions of the sse4.2 instructio= n in the > event that you build with a config that doesn't enable sse4.2? If not,= then > NAK, since this will break on the default build. In that event you'll = have to > modify the new function to do a runtime cpu flags check to either just = use the > instruction inlined with some asm, or emulate it in software. Hello, A quick grep on dpdk source shows that rte_hash_crc() is used in librte_hash in following context: In rte_hash.c: /* Hash function used if none is specified */ #ifdef RTE_MACHINE_CPUFLAG_SSE4_2 #include #define DEFAULT_HASH_FUNC rte_hash_crc #else #include #define DEFAULT_HASH_FUNC rte_jhash #endif In rte_fbk_hash.h #ifdef RTE_MACHINE_CPUFLAG_SSE4_2 #include /** Default four-byte key hash function if none is specified. */ #define RTE_FBK_HASH_FUNC_DEFAULT=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= rte_hash_crc_4byte #else #include #define RTE_FBK_HASH_FUNC_DEFAULT=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= rte_jhash_1word #endif #endif I guess it covers the cpu flags check you're talking about. --=20 Sincerely, Yerden Zhumabekov State Technical Service Astana, KZ