From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 05/18] hash: remove checks for SSE4 Date: Tue, 04 Jul 2017 14:22:30 +0200 Message-ID: <2992653.azzla7F50o@xps> References: <20170620152313.107642-1-bruce.richardson@intel.com> <20170620152313.107642-6-bruce.richardson@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Pablo de Lara To: Bruce Richardson Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 24318271 for ; Tue, 4 Jul 2017 14:22:32 +0200 (CEST) In-Reply-To: <20170620152313.107642-6-bruce.richardson@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 20/06/2017 17:23, Bruce Richardson: > Since SSE4 is now part of the minimum requirements for DPDK, we don't need > a fallback case to handle selection of algorithm when SSE4 is unavailable. > > Signed-off-by: Bruce Richardson > --- > lib/librte_hash/rte_cmp_x86.h | 6 ------ > lib/librte_hash/rte_cuckoo_hash.h | 2 +- > lib/librte_hash/rte_fbk_hash.h | 2 +- > lib/librte_hash/rte_hash_crc.h | 34 ++++++++++------------------------ > 4 files changed, 12 insertions(+), 32 deletions(-) You forgot thash, I am adding it: --- a/lib/librte_hash/rte_thash.h +++ b/lib/librte_hash/rte_thash.h @@ -56,11 +56,11 @@ extern "C" { #include #include -#if defined(__SSE3__) || defined(RTE_MACHINE_CPUFLAG_NEON) +#if defined(RTE_ARCH_X86) || defined(RTE_MACHINE_CPUFLAG_NEON) #include #endif -#ifdef __SSE3__ +#ifdef RTE_ARCH_X86 /* Byte swap mask used for converting IPv6 address * 4-byte chunks to CPU byte order */ @@ -134,7 +134,7 @@ struct rte_ipv6_tuple { union rte_thash_tuple { struct rte_ipv4_tuple v4; struct rte_ipv6_tuple v6; -#ifdef __SSE3__ +#ifdef RTE_ARCH_X86 } __attribute__((aligned(XMM_SIZE))); #else }; @@ -169,7 +169,7 @@ rte_convert_rss_key(const uint32_t *orig, uint32_t *targ, int len) static inline void rte_thash_load_v6_addrs(const struct ipv6_hdr *orig, union rte_thash_tuple *targ) { -#ifdef __SSE3__ +#ifdef RTE_ARCH_X86 __m128i ipv6 = _mm_loadu_si128((const __m128i *)orig->src_addr); *(__m128i *)targ->v6.src_addr = _mm_shuffle_epi8(ipv6, rte_thash_ipv6_bswap_mask);