From: Michael Qiu <michael.qiu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1
Date: Thu, 28 Jan 2016 15:30:34 +0800 [thread overview]
Message-ID: <1453966234-10577-1-git-send-email-michael.qiu@intel.com> (raw)
In fedora 22 with GCC version 5.3.1, when compile,
will result an error:
include/rte_memcpy.h:309:7: error: "RTE_MACHINE_CPUFLAG_AVX2"
is not defined [-Werror=undef]
#elif RTE_MACHINE_CPUFLAG_AVX2
Fixes: 9484092baad3 ("eal/x86: optimize memcpy for AVX512 platforms")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
---
app/test/test_memcpy_perf.c | 2 +-
lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c
index 73babec..f150d8d 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -81,7 +81,7 @@ static size_t buf_sizes[TEST_VALUE_RANGE];
/* Data is aligned on this many bytes (power of 2) */
#ifdef RTE_MACHINE_CPUFLAG_AVX512F
#define ALIGNMENT_UNIT 64
-#elif RTE_MACHINE_CPUFLAG_AVX2
+#elif defined RTE_MACHINE_CPUFLAG_AVX2
#define ALIGNMENT_UNIT 32
#else /* RTE_MACHINE_CPUFLAG */
#define ALIGNMENT_UNIT 16
diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
index d965957..8e2c53c 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -306,7 +306,7 @@ COPY_BLOCK_128_BACK63:
goto COPY_BLOCK_128_BACK63;
}
-#elif RTE_MACHINE_CPUFLAG_AVX2
+#elif defined RTE_MACHINE_CPUFLAG_AVX2
/**
* AVX2 implementation below
--
1.9.3
next reply other threads:[~2016-01-28 7:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 7:30 Michael Qiu [this message]
2016-01-28 8:01 ` Wang, Zhihong
2016-01-28 8:34 ` Thomas Monjalon
2016-01-28 8:30 ` Thomas Monjalon
2016-01-28 8:37 ` Qiu, Michael
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=1453966234-10577-1-git-send-email-michael.qiu@intel.com \
--to=michael.qiu@intel.com \
--cc=dev@dpdk.org \
/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 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).