From: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
To: jerin.jacob@caviumnetworks.com, thomas@monjalon.net,
viktorin@rehivetech.com, jianbo.liu@linaro.org,
jasvinder.singh@intel.com
Cc: dev@dpdk.org, Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH v5 2/4] eal: move gcc version definition to common header
Date: Fri, 12 May 2017 03:15:33 -0700 [thread overview]
Message-ID: <20170512101535.7221-3-ashwin.sekhar@caviumnetworks.com> (raw)
In-Reply-To: <20170512101535.7221-1-ashwin.sekhar@caviumnetworks.com>
Moved the definition of GCC_VERSION from lib/librte_table/rte_lru.h
to lib/librte_eal/common/include/rte_common.h.
Tested compilation on:
* arm64 with gcc
* x86 with gcc and clang
Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Reviewed-by: Jan Viktorin <viktorin@rehivetech.com>
---
lib/librte_eal/common/include/rte_common.h | 6 ++++++
lib/librte_table/rte_lru.h | 10 ++--------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index e057f6e21..ff4a12bbe 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -66,6 +66,12 @@ extern "C" {
#define RTE_STD_C11
#endif
+/** Define GCC_VERSION **/
+#ifdef RTE_TOOLCHAIN_GCC
+#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + \
+ __GNUC_PATCHLEVEL__)
+#endif
+
#ifdef RTE_ARCH_STRICT_ALIGN
typedef uint64_t unaligned_uint64_t __attribute__ ((aligned(1)));
typedef uint32_t unaligned_uint32_t __attribute__ ((aligned(1)));
diff --git a/lib/librte_table/rte_lru.h b/lib/librte_table/rte_lru.h
index e87e062d0..5cc596613 100644
--- a/lib/librte_table/rte_lru.h
+++ b/lib/librte_table/rte_lru.h
@@ -40,12 +40,6 @@ extern "C" {
#include <stdint.h>
-#ifdef __INTEL_COMPILER
-#define GCC_VERSION (0)
-#else
-#define GCC_VERSION (__GNUC__ * 10000+__GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
-#endif
-
#ifndef RTE_TABLE_HASH_LRU_STRATEGY
#ifdef __SSE4_2__
#define RTE_TABLE_HASH_LRU_STRATEGY 2
@@ -120,7 +114,7 @@ do { \
#elif RTE_TABLE_HASH_LRU_STRATEGY == 2
-#if GCC_VERSION > 40306
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION > 40306)
#include <x86intrin.h>
#else
#include <emmintrin.h>
@@ -166,7 +160,7 @@ do { \
#elif RTE_TABLE_HASH_LRU_STRATEGY == 3
-#if GCC_VERSION > 40306
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION > 40306)
#include <x86intrin.h>
#else
#include <emmintrin.h>
--
2.12.2
next prev parent reply other threads:[~2017-05-12 10:15 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 14:06 [dpdk-dev] [PATCH 1/2] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-04 6:56 ` [dpdk-dev] [PATCH v3 1/4] mk: add crypto capability for generic armv8a and thunderx Ashwin Sekhar T K
2017-05-04 6:57 ` [dpdk-dev] [PATCH v3 2/4] eal: move gcc version definition to common header Ashwin Sekhar T K
2017-05-04 15:22 ` Jan Viktorin
2017-05-04 6:57 ` [dpdk-dev] [PATCH v3 3/4] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-04 6:57 ` [dpdk-dev] [PATCH v3 4/4] test: add tests for arm64 CRC neon versions Ashwin Sekhar T K
2017-05-04 15:20 ` [dpdk-dev] [PATCH v3 1/4] mk: add crypto capability for generic armv8a and thunderx Jan Viktorin
2017-05-04 22:10 ` Thomas Monjalon
2017-05-09 9:53 ` [dpdk-dev] [PATCH v4 " Ashwin Sekhar T K
2017-05-09 9:53 ` [dpdk-dev] [PATCH v4 2/4] eal: move gcc version definition to common header Ashwin Sekhar T K
2017-05-09 9:53 ` [dpdk-dev] [PATCH v4 3/4] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-12 5:51 ` Jianbo Liu
2017-05-12 7:25 ` Sekhar, Ashwin
2017-05-12 8:49 ` Jianbo Liu
2017-05-12 8:56 ` Sekhar, Ashwin
2017-05-09 9:53 ` [dpdk-dev] [PATCH v4 4/4] test: add tests for arm64 CRC neon versions Ashwin Sekhar T K
2017-05-12 10:15 ` [dpdk-dev] [PATCH v5 0/4] add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-12 10:15 ` [dpdk-dev] [PATCH v5 1/4] mk: add crypto capability for generic armv8a and thunderx Ashwin Sekhar T K
2017-05-12 10:15 ` Ashwin Sekhar T K [this message]
2017-05-15 2:07 ` [dpdk-dev] [PATCH v5 2/4] eal: move gcc version definition to common header Jianbo Liu
2017-07-03 20:51 ` Thomas Monjalon
2017-07-04 8:48 ` Sekhar, Ashwin
2017-05-12 10:15 ` [dpdk-dev] [PATCH v5 3/4] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-05-15 2:32 ` Jianbo Liu
2017-07-03 21:06 ` Thomas Monjalon
2017-05-12 10:15 ` [dpdk-dev] [PATCH v5 4/4] test: add tests for arm64 CRC neon versions Ashwin Sekhar T K
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 0/4] add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 1/4] mk: add crypto capability for generic armv8a and thunderx Ashwin Sekhar T K
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 2/4] eal: move gcc version definition to common header Ashwin Sekhar T K
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 3/4] net: add arm64 neon version of CRC compute APIs Ashwin Sekhar T K
2017-07-04 13:53 ` Thomas Monjalon
2017-07-04 9:24 ` [dpdk-dev] [PATCH v6 4/4] test: add tests for arm64 CRC neon versions Ashwin Sekhar T K
2017-07-04 13:55 ` [dpdk-dev] [PATCH v6 0/4] add arm64 neon version of CRC compute APIs Thomas Monjalon
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=20170512101535.7221-3-ashwin.sekhar@caviumnetworks.com \
--to=ashwin.sekhar@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=jianbo.liu@linaro.org \
--cc=thomas@monjalon.net \
--cc=viktorin@rehivetech.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 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).