* [dpdk-stable] [PATCH 16.11] config: make AVX and AVX512 configurable
@ 2018-11-21 14:09 Luca Boccassi
0 siblings, 0 replies; only message in thread
From: Luca Boccassi @ 2018-11-21 14:09 UTC (permalink / raw)
To: stable; +Cc: zhihong.wang
From: Zhihong Wang <zhihong.wang@intel.com>
[ backported from upstream commit 1838af33997daa7a2093e3aa7bf95a2d0c9578bf ]
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 <zhihong.wang@intel.com>
Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
Fixes build failure with gcc 4.8 after the backport of:
8d07c82b239f ("mk: disable gcc AVX512F support")
gcc: error: unrecognized command line option '-mno-avx512f'
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 802fb5e32..4f4480682 100644
--- a/config/common_base
+++ b/config/common_base
@@ -98,6 +98,14 @@ CONFIG_RTE_EAL_VFIO=n
CONFIG_RTE_MALLOC_DEBUG=n
CONFIG_RTE_USE_LIBBSD=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 c7027a0fe..5cef63abd 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,10 +88,13 @@ 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
else
# disable AVX512F support of gcc as a workaround for Bug 97
@@ -97,6 +102,7 @@ ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
MACHINE_CFLAGS += -mno-avx512f
endif
endif
+endif
# IBM Power CPU flags
ifneq ($(filter $(AUTO_CPUFLAGS),__PPC64__),)
--
2.19.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-21 14:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 14:09 [dpdk-stable] [PATCH 16.11] config: make AVX and AVX512 configurable Luca Boccassi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).