From: Zhihong Wang <zhihong.wang@intel.com>
To: dev@dpdk.org
Cc: yuanhan.liu@linux.intel.com, thomas.monjalon@6wind.com,
bruce.richardson@intel.com, Zhihong Wang <zhihong.wang@intel.com>
Subject: [PATCH] config: make AVX and AVX512 configurable
Date: Thu, 27 Apr 2017 12:34:19 -0400 [thread overview]
Message-ID: <1493310859-49106-1-git-send-email-zhihong.wang@intel.com> (raw)
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 <zhihong.wang@intel.com>
---
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
next reply other threads:[~2017-04-27 3:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 16:34 Zhihong Wang [this message]
2017-04-27 9:08 ` [PATCH] config: make AVX and AVX512 configurable Thomas Monjalon
2017-04-27 9:18 ` Wang, Zhihong
2017-04-27 9:20 ` Thomas Monjalon
2017-04-27 10:03 ` Wang, Zhihong
2017-04-27 23:00 ` [PATCH v2] " Zhihong Wang
2017-04-28 2:08 ` Yang, Zhiyong
2017-04-30 21:19 ` Thomas Monjalon
2017-04-28 5:07 ` Yuanhan Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1493310859-49106-1-git-send-email-zhihong.wang@intel.com \
--to=zhihong.wang@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
--cc=yuanhan.liu@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.