From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id DC5025685 for ; Sat, 19 Mar 2016 20:58:10 +0100 (CET) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3qSCZB4pwLz5qG; Sat, 19 Mar 2016 20:58:10 +0100 (CET) From: Jan Viktorin To: dev@dpdk.org Cc: Jan Viktorin , thomas.monjalon@6wind.com, jerin.jacob@caviumnetworks.com, tomaszx.kulasek@intel.com, jianbo.liu@linaro.org Date: Sat, 19 Mar 2016 20:58:05 +0100 Message-Id: <1458417485-29436-5-git-send-email-viktorin@rehivetech.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1458417485-29436-1-git-send-email-viktorin@rehivetech.com> References: <1458417485-29436-1-git-send-email-viktorin@rehivetech.com> In-Reply-To: <1458379590-18618-1-git-send-email-viktorin@rehivetech.com> References: <1458379590-18618-1-git-send-email-viktorin@rehivetech.com> Subject: [dpdk-dev] [PATCH v3 4/4] eal/arm: introduce CONFIG_RTE_ARCH_ARM_NEON_MEMCPY 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: Sat, 19 Mar 2016 19:58:11 -0000 The flag is used to enable memcpy optimizations in EAL. As it is not always the performance benefit, the flag allows to disable it. Signed-off-by: Jan Viktorin --- config/defconfig_arm-armv7a-linuxapp-gcc | 1 + lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc b/config/defconfig_arm-armv7a-linuxapp-gcc index 96c3343..2c60c2c 100644 --- a/config/defconfig_arm-armv7a-linuxapp-gcc +++ b/config/defconfig_arm-armv7a-linuxapp-gcc @@ -36,6 +36,7 @@ CONFIG_RTE_ARCH="arm" CONFIG_RTE_ARCH_ARM=y CONFIG_RTE_ARCH_ARMv7=y CONFIG_RTE_ARCH_ARM_TUNE="cortex-a9" +CONFIG_RTE_ARCH_ARM_NEON_MEMCPY=y CONFIG_RTE_FORCE_INTRINSICS=y CONFIG_RTE_ARCH_STRICT_ALIGN=y diff --git a/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h b/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h index ad8bc65..988125b 100644 --- a/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h +++ b/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h @@ -42,7 +42,11 @@ extern "C" { #include "generic/rte_memcpy.h" -#ifdef RTE_MACHINE_CPUFLAG_NEON +#ifdef RTE_ARCH_ARM_NEON_MEMCPY + +#ifndef RTE_MACHINE_CPUFLAG_NEON +#error "Cannot optimize memcpy by NEON as the CPU seems to not support this" +#endif /* ARM NEON Intrinsics are used to copy data */ #include @@ -325,7 +329,7 @@ rte_memcpy_func(void *dst, const void *src, size_t n) return memcpy(dst, src, n); } -#endif /* RTE_MACHINE_CPUFLAG_NEON */ +#endif /* RTE_ARCH_ARM_NEON_MEMCPY */ #ifdef __cplusplus } -- 2.7.0