From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhihong Wang Subject: [PATCH v2] config: make AVX and AVX512 configurable Date: Thu, 27 Apr 2017 19:00:14 -0400 Message-ID: <1493334014-69488-1-git-send-email-zhihong.wang@intel.com> References: <1493310859-49106-1-git-send-email-zhihong.wang@intel.com> Cc: yuanhan.liu@linux.intel.com, thomas@monjalon.net, bruce.richardson@intel.com, Zhihong Wang To: dev@dpdk.org Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 0453B1077 for ; Thu, 27 Apr 2017 12:01:56 +0200 (CEST) In-Reply-To: <1493310859-49106-1-git-send-email-zhihong.wang@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" Making AVX and AVX512 configurable is useful for performance and power testing. The similar kernel patch at https://patchwork.kernel.org/patch/9618883/. AVX512 support like in rte_memcpy has been in DPDK since 16.04, but it's still unproven in rich use cases in hardware. Therefore it's marked as experimental for now, will enable it after enough field test and possible optimization. Signed-off-by: Zhihong Wang --- Changes in v2: 1. Add comments and explanation. --- config/common_base | 8 ++++++++ mk/rte.cpuflags.mk | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/config/common_base b/config/common_base index 0b4297c..93e9235 100644 --- a/config/common_base +++ b/config/common_base @@ -103,6 +103,14 @@ CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_EAL_VFIO=n CONFIG_RTE_MALLOC_DEBUG=n +# +# Recognize/ignore the AVX/AVX512 CPU flags for performance/power testing. +# AVX512 is marked as experimental for now, will enable it after enough +# field test and possible optimization. +# +CONFIG_RTE_ENABLE_AVX=y +CONFIG_RTE_ENABLE_AVX512=n + # Default driver path (or "" to disable) CONFIG_RTE_EAL_PMD_PATH="" diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk index e634abc..4288c14 100644 --- a/mk/rte.cpuflags.mk +++ b/mk/rte.cpuflags.mk @@ -70,8 +70,10 @@ CPUFLAGS += PCLMULQDQ endif ifneq ($(filter $(AUTO_CPUFLAGS),__AVX__),) +ifeq ($(CONFIG_RTE_ENABLE_AVX),y) CPUFLAGS += AVX endif +endif ifneq ($(filter $(AUTO_CPUFLAGS),__RDRND__),) CPUFLAGS += RDRAND @@ -86,12 +88,16 @@ CPUFLAGS += F16C endif ifneq ($(filter $(AUTO_CPUFLAGS),__AVX2__),) +ifeq ($(CONFIG_RTE_ENABLE_AVX),y) CPUFLAGS += AVX2 endif +endif ifneq ($(filter $(AUTO_CPUFLAGS),__AVX512F__),) +ifeq ($(CONFIG_RTE_ENABLE_AVX512),y) CPUFLAGS += AVX512F endif +endif # IBM Power CPU flags ifneq ($(filter $(AUTO_CPUFLAGS),__PPC64__),) -- 2.7.4