From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0068.outbound.protection.outlook.com [104.47.36.68]) by dpdk.org (Postfix) with ESMTP id 0AEA65951 for ; Fri, 12 May 2017 12:15:54 +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=irSucutwVBQDzfkHZhkXN0RlV3waciTyDVDEae42WcI=; b=iqAvHFAhkgSYHIgUuC+EDyfSO4R8osg3IFW+RizgBSDL7Z9k4cO2H5sJTFEg8hO5GNa8ccievachtgB9fjQ/hYpwfnG+CtHziu60GaveCRZimbFenh+/bhoeeXRsmy6Fqp/mKNXdc/h1hht5S6kdbHHApD+1SWBnmFNC4AQ4kKM= Authentication-Results: caviumnetworks.com; dkim=none (message not signed) header.d=none;caviumnetworks.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.1084.16; Fri, 12 May 2017 10:15:52 +0000 From: Ashwin Sekhar T K 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 Date: Fri, 12 May 2017 03:15:33 -0700 Message-Id: <20170512101535.7221-3-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170512101535.7221-1-ashwin.sekhar@caviumnetworks.com> References: <20170427140618.35897-1-ashwin.sekhar@caviumnetworks.com> <20170512101535.7221-1-ashwin.sekhar@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: MWHPR10CA0069.namprd10.prod.outlook.com (10.169.238.31) To BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bd61a57b-1351-48fe-5aff-08d4991fdf1a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 3:mP100RTID/f6KSFK9aujciaS6UpReSfXcxaP0jqO90vi6e3vzOmEqWZfCk2czxEwUrOdDqmbf4EzFFd+ERQifo6g37rEJEfSIvGNpD3C4bSvaVNbmjlr+IrsxKoAh4ku/qxWTTnaO7XKh5ZQ9seg6vUitLYIVfnb549EEOlyA3Fv/KJIShTGp5Qvod1QGh5kzaYc+TAI2pN+CasTG94LJVyuc13zDmoZ07epSAnSBZDBvjZLukiRyyEnBQiqzz/qZY9UEXh1yr52F0CMlPwhPHbfWgIPZyCZmwQKaffEU4I6uOLeIFUKbpQ2gLVzb0cpdJJV4VpvIKfMvB5PAAWvGg==; 25:nL8JuYQwxNHnZEYBvjUAKZbau5K64FlZH57Ysf9LueC8H8kuzJdWsLobAQua0M2gSZOW+W1cvT9bennhcuXYPowKtcobukJcJmSKZWn2wuVPoaYEsljC03qBOOeosm910wZsvII5YKquBHQf+1W42PojT3Vp2v7dv83HG23egKWdmtCQYoYsXkht/kfzW5LHS7FYkyIgMbbZLytagVXVzcrZzEXZnPZIAIt2T1gZfueits/kVcP8o7MZUwYoq6AUXgQTtTntWY5a03Z9W0MgKuuvrRBuNV0uN/+pN5kLz+UAqy0j4VIFVJzb6xyhVY8glTiF4rnSSTJeoKp1lV0s7xjOisk3HRmUSnXkRgxE61qH1fiIReZKz0b9Qn/HlQgOQRWZ9D+pTMWkdgNzWTVPiNKr2yFNuKeo5P1Tgw2qP+ZkaVMNLSY5geEiRXikFWW2AllidmlJu4irXHxWpABCGH4PSmBe+xev2+29FzwfzNk= X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 31:DIqkyk3wzTcW5ezm434YfMr872WhRqv9YXKb0DxknIFTM9KRWBnOjULp3WD/N27vNZJfGQFdbvYY5Zz/x9YL41X3d8muqFAjYcHnL6+AT5QKE/X641N9S827/YeycrU+GTUKNuGhhlbpIT5UlmJbfqD2VM9MeO5hVByuxaXNTGlFDHUY3k5pwphkBWktQ4M6VrqA6g37SEsDYqZsAoADvFaoQyowcKtrNWAIeqWWo6k=; 20:4RPLtUu3BY31rTp1Nl8NIS37oO0qVBhvljOnEzMs7lGD/pFopNLzdk5PeLEQq7hE8Gq4EXwlJIBl9UTvD9E/juHLrqU0xVWjwDtJ5p/ffLzdJk9faovnKfNUw2fC3khC6hjOFWFXgzl1flya5EkmzMTOCDDlQRcjPeh/+X3OQOBqxrTfPMyVYHDRJptGJ2eNf2oqpThUV+GnlF6+hBEBGAtzxxegLqQzPyIfk6FNlMdK5yTJL+kQWSaHz+NtW/eF3i8sV53Ngzekae8Oa/yyIW9ue3vYxcPIr4jfNPaH0RsEbYwkswk4kotfYBQ0mQlf7A93JehAYV2sEDSx22BjWuS7geTGq0jy9e9HjQdInMtK1jOjZxZ2z2v/Xl+6CVTmfjjddlaj4xl6QMcyA/Gln/VMud8kn44Eyc23sSyEodgGSrRW2fCwDN1N86Bb2FhJq/wiuRxLTSNqNkYxyBst/c48eOUaHdH7TO8i4MQAHaQs750/QG+PBjrtG/B17bvCliPwHfch/WDPqMQRg031jhh5hedIw4La437t9yc1r5/9qzPxSJijun4ol2eo26vcRD+FAqBhzzwNQCW9BEG/EBt7Cymg81bNRLknpuxq4ag= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(6072148); SRVR:BY2PR07MB2421; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 4:P0V81I6XWtrRn0QKANd9DnbGhWRYKFZr9DIp2P3lrHQG4Mkc1eZGFZu7i5AQRxuWOA/+OgeNmEI1lHGXc7WqLuba8fZaJz7hYD1ALgNXds+U5ly74JXg8IFOfFWhTHxHxfaT+uAkjEv3NYGbF3h4XZ6H18A3iF7Y6Jl6S1aDfY/uTXmul0RiqbX/R1XM4KLmJdtHNQW4sOUpsG2lQuuRstT3BcmdY/6dg5SqAXwgt03rP2/0sRvCiYfW8nqnUPOaSloL4FWgz47RCrW8F/8nLQUysNXLn4RJfnkYNTT4kFNq4xI0yZZS1+gTiP6DGhlja+ie7BKfkQfVjfBx8MH402paInbShDtwHc5Upbj0tH8+6QQuXy/eR3CBn+uAoBL1wqEkqwVBK1dGi6byG67URn7pHxQEoUNmozBmzrYnOgaDaMTKwij8Q83LP6CqetyU03ni8dLoi/AJrVjp7uSughISnwYcXCaC5/AXLOCYGccnHZvxnRfPR9UI1T6ijTFmc8ZXGNDfdDbm877eilqsCQ2ukfZ+1OTK0yV5/GZ25F9qpnUCD8/SpYiQsV4jvCqSOU12ANwRazxdjSdYQeX2Wrs12kI3D5bBGKdp9QXpQn+2hVi0NCPGDAZnNSkSo3ND+s843YRTxekx5mGsES7YBPqu2C8+EzHWvQivt/X8GNUfYNvBsEEFNUE+wSwP3elOFE7erV+8GnJP6sG2zDWTHSLfvSL2mPsAVFg7XjT2mQOHX+xhse3wyuW+AHIcgpBkWCJXATnzUMDyBVm5RhtlCA== X-Forefront-PRVS: 0305463112 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39400400002)(39840400002)(39450400003)(39850400002)(6486002)(8676002)(5003940100001)(6506006)(25786009)(81166006)(76176999)(42186005)(2906002)(47776003)(189998001)(66066001)(33646002)(50986999)(48376002)(53416004)(50466002)(7736002)(4326008)(478600001)(53936002)(50226002)(305945005)(6512007)(6116002)(3846002)(2950100002)(42882006)(72206003)(110136004)(107886003)(36756003)(5660300001)(6666003)(38730400002)(1076002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB2421; H:1scrb-1.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR07MB2421; 23:GMvOP4Hk4lF3tJ1lZnkVuhrRN+NeH0yXqcQGMKIvU?= =?us-ascii?Q?L4w0syiTLLvrN2RJoHCju8owXVa28HGLyPzRGCQFwQQiKNFVGOLYiPQ46Xra?= =?us-ascii?Q?iTlAeBMZviNILUO0QoIN8s+SFghehXCp/C7dsH5kIZzM/MbPobkmG1HDkYje?= =?us-ascii?Q?J3mcIyXMiH0bLO5zVXchWy+qDZyPY40oGufY1t2zeYSjGTUT9V3YG+4vbcG+?= =?us-ascii?Q?3jjdoAAL5DmZuSJ5++QvWSiyqh1J3XRFV3+kB3OQ4Rfds1plsBuE4XgcYPgT?= =?us-ascii?Q?TKux1WwEPjHirAf7RWZfs0bDwmGbrP7mKuRVThiQSEmWpaSEe4NM16TVU2XE?= =?us-ascii?Q?xJniFkR1Zj8zH7tkv/yJO5GmzPKfRRP1cUu6WM6mV9MvCkJQTM9BSJ0/IMDu?= =?us-ascii?Q?DJQ1UVmAkU8geCa2Xf0j6UEXZ72xYkqSQRQtP9/0h0yFZrMbwO5gY4oxDo1W?= =?us-ascii?Q?Ez9UysuWIPTSkS7OiPeQgwiw4QyPMK2qTXkm//wPrrGQgO5nGjQWC9T41ScI?= =?us-ascii?Q?/mLydjleC3OrUvAEnAbZZ8kAxZvgykOggjwO9A2kLBJHm5Xme10OzsuGgOyJ?= =?us-ascii?Q?baou3R5zWIfdC3ME0IuEWQtDGakxXsCjk1Auzc0hEyvq92Ok+24JYCVPcseT?= =?us-ascii?Q?04PVEhu6IbsoLI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sbxIn7XrqGiRZc6Z9IYHIRVVoHl8moHdi8lHDaRxKbbwt2Fu3enn/9cc5xwoKoLfQ==; 5:cF5IZlxg1rxw8sBRw+so1UYgnkBRT38JD3LBH20B/1sQf9JQRWI9K2WbxwfaZYsM0H7VExmuM78HoGlqKIM9XrnMl6w07b5HKIzbtw5zIqQqDcQrIyVYGO5U1zsH+YwYKO5vA0Godt26/C/xx11tNw==; 24:lzOdOMlz5O2ljcWxZ02NTWfWU+pxSkP8bb5LorRkDxMQUoyq9JewDS6EuddDFiHJyz91uduUxwCpS7ni1obe6M4MJoFFlvLgBEZaqDb867Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 7:tatsl/Vs/XTuLJ05qhEfK3l7HMT5bBoYK41oLOlTewhkRPDm6L2cLC/XUdtOWpZx8ZFaHFRupX5UkWQ0wcZVdbQELfDQUl/2QcsluGsUlHVE4+wkxHXi0WTnhfmXnotBY8m+4RvZYAQBDnnymrWmfzN8PRXm4VJCNFsEI+YGkzuUD650MZd8lyIN/Qkl0R9+/uw8EkG2tSe2NsX9npoN947cjlRO9T+dTVym5ol71F1+D/vSzTIeTlQo75rc2OjqOsBR6B2qqqdFRwrMz+dL9gXl37UZcPlwL9aZeybcPVlaRuuBI0cB9eUdmPyFQam64MkgDYNrIjJDtxIA9t9OBw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2017 10:15:52.7789 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2421 Subject: [dpdk-dev] [PATCH v5 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: Fri, 12 May 2017 10:15: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 --- 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 -#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.12.2