From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 98156F94 for ; Thu, 27 Apr 2017 05:36:01 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2017 20:36:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,257,1488873600"; d="scan'208";a="253993085" Received: from unknown (HELO dpdk5.sh.intel.com) ([10.239.129.138]) by fmsmga004.fm.intel.com with ESMTP; 26 Apr 2017 20:35:59 -0700 From: Zhihong Wang To: dev@dpdk.org Cc: yuanhan.liu@linux.intel.com, thomas.monjalon@6wind.com, bruce.richardson@intel.com, Zhihong Wang Date: Thu, 27 Apr 2017 12:34:19 -0400 Message-Id: <1493310859-49106-1-git-send-email-zhihong.wang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2017 03:36:02 -0000 Making AVX and AVX512 configurable is useful for performance and power testing. The similar kernel patch at https://patchwork.kernel.org/patch/9618883/. Signed-off-by: Zhihong Wang --- config/common_base | 6 ++++++ mk/rte.cpuflags.mk | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/config/common_base b/config/common_base index 0b4297c..9ca94a8 100644 --- a/config/common_base +++ b/config/common_base @@ -103,6 +103,12 @@ 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 +# +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