From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhigang Lu Subject: [PATCH v4 02/11] hash: check SSE flags only on x86 builds Date: Thu, 9 Jul 2015 12:58:48 +0800 Message-ID: <1436417938-18496-3-git-send-email-zlu@ezchip.com> References: <1436417938-18496-1-git-send-email-zlu@ezchip.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Cyril Chemparathy To: Return-path: Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3on0075.outbound.protection.outlook.com [157.55.234.75]) by dpdk.org (Postfix) with ESMTP id DC5085A6F for ; Thu, 9 Jul 2015 07:00:04 +0200 (CEST) In-Reply-To: <1436417938-18496-1-git-send-email-zlu@ezchip.com> 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" From: Cyril Chemparathy This is necessary because the required CPU flags may not be defined on other architectures. Signed-off-by: Zhigang Lu Acked-by: Bruce Richardson --- lib/librte_hash/rte_hash_crc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h index abdbd9a..1f6f5bf 100644 --- a/lib/librte_hash/rte_hash_crc.h +++ b/lib/librte_hash/rte_hash_crc.h @@ -425,12 +425,14 @@ static inline void rte_hash_crc_set_alg(uint8_t alg) { switch (alg) { +#if defined(RTE_ARCH_I686) || defined(RTE_ARCH_X86_64) case CRC32_SSE42_x64: if (! rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T)) alg = CRC32_SSE42; case CRC32_SSE42: if (! rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_2)) alg = CRC32_SW; +#endif case CRC32_SW: crc32_alg = alg; default: -- 2.1.2