From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0040.outbound.protection.outlook.com [104.47.32.40]) by dpdk.org (Postfix) with ESMTP id 39A7E68A1 for ; Tue, 9 May 2017 11:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=T0721thR16t5hNB/kkB8uYt0hZmRdG0iUVaN4X+2klQ=; b=GdzdDh114bMkfWCDc26Q5/esho0Ey/IDqKueRemaYLOPXiForq8qWVmrLS3B1x0mnjvfOYJ5eoE9yC1+MtDdxCel4qcGi5A2HwcL53nJxD0nMT5J0cxlln/4HwNZxiche0vob4hNd3OdzyMXdE/jpeYfvrL0pelYfM9SjdjBWbs= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from 1scrb-1.caveonetworks.com (50.233.148.156) by BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Tue, 9 May 2017 09:53:52 +0000 From: Ashwin Sekhar T K To: cristian.dumitrescu@intel.com, thomas@monjalon.net, jasvinder.singh@intel.com, viktorin@rehivetech.com, jerin.jacob@caviumnetworks.com, jianbo.liu@linaro.org Cc: dev@dpdk.org, Ashwin Sekhar T K Date: Tue, 9 May 2017 02:53:39 -0700 Message-Id: <20170509095341.10734-2-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.13.0.rc1 In-Reply-To: <20170509095341.10734-1-ashwin.sekhar@caviumnetworks.com> References: <20170427140618.35897-1-ashwin.sekhar@caviumnetworks.com> <20170509095341.10734-1-ashwin.sekhar@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: MWHPR10CA0071.namprd10.prod.outlook.com (10.169.238.33) To BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7d7351ac-6142-41d6-a92a-08d496c14d3b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 3:cbi5Mj8rPt/EaU92X1DQu/ooT++m4O0qmN3ebME/DNdgkWYH3AqDjnd5GS7+SVdQZEurHbMX/i14x+pI6JeMk2TNbEhsc/ok6OyjMCZPxG785j3Hea8EFqcv8JrnwnEYfT5Wo0Kiv4wMXNghAtirPX4W0ZNhvoPmKBJamNWO5o3RqpMABapOgr6xhXE1GsG/i0GdbIMm0UVm8l2QSpeiKO5O/Uq60of1UG99CAlHPruwXO94g5xl+18/0B3GrP+tkerJF3NZR6dvnmulUmirTDF/28hutiFUIw8JmIwOqcpku2HT4nnNa6Z6wUxPxq6tJhrhybbOhdLIh0Bc1GUeqg==; 25:Zv1tfyLX1zClklfZoEZKCLJJoNpWuB2wYL9heFgkMlY/PenjV1vRxEWkOwJyLlUwZ8Mr7WkLDH4kNmdGyyN4z/6d+VEmc+wI9AJO0NUxRmXL9f+vGKTADGkt60HKXkyZYDgqZ3FGQbH6MYuzzIgqbM1KyoZMi8z/ix5akU5YdJ+x9xTm2meg2MeD9yQTXSdeOtaP995bRKzNFCYHkVE/8u0qVI8pEKoqd9ikv3Tp9gCBSCbBM2MVd7/opwR5tn9+EJmel8G/MQD0VWEkI4rrahUc4SW0tdIDKLxSHkHGWJmQjjo8x99D9gjkWOgFmSzC0zeEw2b3IJny8XiQFQn0FQUnXSlnbEvdBu7XOgPT35wlpOj15lQHm/MjQrVlQgMWg6+Ptuc6LghgJf/ZkkCCHXcvuMSg1C80Z2nQ2k1i4NF1vaXvLcv74NDEDGaIF9Q3Sn3IEt9WK9m26YxOSlp9Fw== X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 31:x7vV71gTi/ZQozPeenGbj531rUf5L33tQlOqd7LYhnpfAs4Q/LXYP+mFls6TsxQ3fUrGHnoCGoAVm1K0ydts4k//KJNRfPy3Axgkya13zX70zQlJeWTsMKsHOVcGsUu6w+Pwv+19UfFgPyn04ZZ2qUo6Ne0HwcD0047ySrxffCGW4vWMOWWGTbUVCejv6qSln8oNa6NKD7W6GNOTZ996DuIRvt593zeirz039xToDYKIbwXHNzsWeB1wQ6WyTD0r; 20:X9z5yQkwsVIiybjG+itwClwEeaOR//8SGgAZo9+0qs+sHZ+RHiyUHNg1aiOhNdHsKrdVC50/MkYp3I+uxPHURxBgddLGgXEalq1w9WiLQymi/N/lyMVGZmumcDHW9ngl75r8D30QRyIq1r5DjzlZuT5C1MqrQMSvGFPptBXj2YU8AB9CcjCm8zsHJj8hDj3i1PKFF8ZAztyP1P3aKDXNuyVafCW1cgkJLIvCOMnsMNS7Ek3mtg0Yar4L9a3FYkYm5MpcLCWQl7Ww9L8jkt94kY3AKDgXpd8WEzC/L6sV8GdH6K5DTFNdY6akzbX/kpM3LnauKe+wbH0GJCCA8tdCPQ3q2ciMR0ky7eqWDMwuhX4gWYZB6faW7iBmGAgmvsPjPkJllm1gZyQrctrbXpN4tZnzPWCvlqwtHqfZg41KevtPxWrW3J8nVV5vAm+hZuONQUb9e7TSzecj5CkRHmhbmAGKi/EIcM4xjDd3j5QrG30mJQWnG5sAmR9wewS0QyJifjFU00QELjQGYPfyj0ZHMk0yv1oKFEmRjsiMQkNAhSadVkMOAEJn/CYtLYTA+uTFpkNHdrm1P5cupO3U8iOlUuaR3PbJlXrydMIKrY4fsD8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201703061421075)(201703161042150)(20161123558100)(6072148)(6042181); SRVR:BY2PR07MB2421; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 4:LXLwZ/htDZpwO/tdXUJ77ls7hMk2jv+xJaqVLTch3YrlNFu4BxtEvcsymvRNWRRLMDsU45bX0m2gXQ5orSgoPX6jouf2l6w2u97AhQYheb91oXT/JoWbrq2ylvpV8T3R0tbnGLI90kdcavrC5PhncGCXjy1k/cxavgtAsXp2IT3uJrmhNLrmRKzcMrSKnG9DtjarNaPSo72n31DJojaKpyYszLMei+GxoJzJiEhIKc+LSOc1/AL1FHpjjbOdhnJYQVbStpI2AdWGjv0I7Zs/9ePlr/xhx3XdpzboxgJEpZV3gk9K8NZ4vFuh9TfPvAzXu2QD7EN/5onWmnjMk20MNpnNVe4Tnxz0WGlOiAKcp3y4A2XoF3Bra1QguaFz+thwlDs4b3Alt+mWMlvygYkZWClWj1d1cdecj21MSoSTF/7yo5KGlCpzmnbn4hp0x69zfGulCb7imrT06aSqOWoUm/kxEGAzQVPJo6eRgZdIAnuxHHMBp3qUUVQjb4WHmDlbp/6htdTuh2koY9toJB6Z/AWsYwK7CLe7N3ZapLZu4xy+hCEIJXdgc2UhJ8injzVDxTZkJ4tiJ4xSsE5NTHEThBUlAHIhfQcN10Ll/eaJsbHqsyNMvte//Cc4blm7PlI00lKjZnas6M3EAS6j3scl0rlYJZYoM1TL07K4DEZB30Vshmi4wm2Z0MU1w+HiURFVMlmTJg/RG+ED4swnfqBndXFNUQr5SDIhGhUZR23aAUi06oW1BlOZGe0SDAoULCyd X-Forefront-PRVS: 0302D4F392 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(1076002)(4326008)(3846002)(50466002)(48376002)(6512007)(6116002)(66066001)(498600001)(47776003)(36756003)(189998001)(25786009)(6506006)(50226002)(5660300001)(6486002)(6666003)(38730400002)(107886003)(110136004)(50986999)(33646002)(2950100002)(42882006)(2906002)(53936002)(42186005)(81166006)(5003940100001)(305945005)(53416004)(76176999)(7736002)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB2421; H:1scrb-1.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 23:4aMqTBXMO82q5TzGbL8ga4votjcOx8zYbkeO7RlSD9prWZO0w6Jw6cT7yTJo2daFme2xBrRSlpp7Vh5L5Sg/KN4ODdo0PbHdMj6vagl7/UWMzBxc7Ejcf9YXtcHzLVuuYJHaqpmDTK0PQ/y7g5oj/sGw71IKqQXStlKiYuBoYW1ri1ZkLCqKG3Wbrv6Xot+wyStMt8Y+72r9o6smK2TGdl5k01hlvXmmDOog1dUpX0dRNdtK7nP5z3kP3VO7lQ9Sp06OWvkA++SNQc/15iXmy4lNmO0IED8e/9F68cxARnGfQk7tP9118Z/zDMYxeBbu1F6VvbxV3RZDl1nEcguvJbBS7nygfUAYm8w47LguYV8ynycuODJqBnnXNLzIaJk1KRfgUfGTXee2Cr9xpkr03mvkuaDD3zXZKR4neNuYRSKgvHGy5GewF9NMh2KFz6vZZ2c5EVa5/foEXkUyuzzIXrSQPro3z8Llv8pkSJUDRZwD7tkETPGqiKt51Yic5tm+3ZVBzs4md3bAwWTJgxn0pxkGvmuR+G3A6P8+WhcqgUs8ePdccUKM55ifBIp2g4owrS8+ntXGQkFJAHGI6j0MpaXrYi+NBNt8AL5yIFHGdVuMRt4wHHVBqdxJMbogvM4IQ0YUDT6KICazK9Z2w9teShm5pUoYfgaxSfzU0IuZJ3sGoqE23A2L5Ud+VGnERoLsxIog4QQ3eNIi+rGNx3rSJeEuYM2KJTRLwSfLUXllsy3J13M7fDBxQaqZq5RmRPkHimE8u6ncXgeOki60Gmqu7v1U66Cq4m2P17avDetLDpm4K89whzL01QpQfbT0MJEN1yqSmGPAz9els17uNHEWm8Q0rinl13X55HmknulyNLs/J3NoV1XLuW7MeEgG8HZ+Req9FkwtYM0jX2puXuEOO9s5x5fbN7o4JVLtSo7Kkp4= X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 6:6BhDyGx6EOKVP+dsOkaK4X6KI1TAnuTd39phaL/+sri2MOKeUZskWmYfevgQj0iFmiXNdgIcgY7ANtBLBvSJU5nxAAX3Z4ZQtQ3KLZniAmBLHeYELtSFA3nmUHGEHkQbJbTmO8VwjSwFa5krAr4IEdp9Q+rVV7prRzLI6A2M0jOKO7aSwcCZ3pLgN7pRke2ez+ryIVfFryJEUv6/UXWXilM+rDOnUhuwsPbXrl+7+Y+xidbXJBHWcw/eVeRQYjKn+LZLsNwZZvan6X/QU6YFv3qWtazv6LOtVg4z1rHyqEeG7qkIOtQPaf/vNfNCmZcottRvSFxWqG5pN0juXHQHmrQtZxYLMABind86FZjhf0w7N4U7xipZSEoSyzhj8rPr9e0NPGdO1XtOgVikFho5Ym05X7rdITQRo++Fht8kR2G/YrNW3Jzf++oSP/iOzktVGQ2lUAbCNewjatcLM6UnENF5gJpzIpQysAzersNFsQAuSugXJyR4wl4NfDz63ULRoqvF0KuSKDDZt2zpFSCeFDg+VGkd9xEAY4SESSvAZo8=; 5:VGNi487DVky0IKtDt08KzLOAdmep9eHoBCucVuO0YVr5LhHHJsFX0/HgHlTxcHoibsIHqFkoDh2m4zt0AZCmKe2GG2JW1DdATkqPBeDYJFPmia0xbjBJDTFr2u0SVCvL8di1tCKmvHP4XM/2HvuwReorW6prezYvumW74JrKpGk=; 24:1QKteCSAphob9OmeqJy893LKbpI7SkOsbJ4E9V2riey4fLpI5zdl0VLvElEhVViCVRwV2CKWQGcEjr/2xvkpoCZSbdSCcj/ANHMJsQFDDMQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 7:4FuW4Gnpz4wiFn6SWiSquiEVPenWqtQ7jXhfMSrIBrf/YpBpLVmzzCxbq9I9qEddi4PS+g0rJxcMAJMwQzk6qnWo8jlN/wlqoYXdMo9KFlL9bcy0kR+rDj8G82ZV0mT5a+ZuPw0PT/SvuhnveeuJi4CH5dowb/feZeqLRbaeRi5zzQR8gL28Ee5t+xHcJuYnIqmYm5Dhipr0ca1+VcUPx20/YN6Lxrq3QdP6S5mvVvWylxqz7/1GEagoiWX5ydQo3IHBrbmIpQ899jIN0p6mOW4xtzlnBdtYb5ZbvtADnqtIeOJQrHv1YHx+h0ogLeQ8kP5D9JTEl6/0HGdtHdzZWg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2017 09:53:52.9958 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2421 Subject: [dpdk-dev] [PATCH v4 2/4] eal: move gcc version definition to common header 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: Tue, 09 May 2017 09:53:56 -0000 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 Reviewed-by: Jan Viktorin --- v3: * Moved changes for GCC_VERSION into a separate commit * Moved GCC_VERSION definition to common header * Removed the same from rte_lru.h v4: * Edited the commit message body according to comments * Moved definition and usage of GCC_VERSION under RTE_TOOLCHAIN_GCC flag 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 e057f6e..ff4a12b 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 e87e062..5cc5966 100644 --- a/lib/librte_table/rte_lru.h +++ b/lib/librte_table/rte_lru.h @@ -40,12 +40,6 @@ extern "C" { #include -#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 #else #include @@ -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 #else #include -- 2.7.4