From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0085.outbound.protection.outlook.com [104.47.38.85]) by dpdk.org (Postfix) with ESMTP id 53C61282; Sun, 13 Nov 2016 21:59:33 +0100 (CET) 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=TnGQy82YwEE8e38SyVEo37cZNyqC+Q9MOHG9Axczg8w=; b=QRLN6P6U386s/yfJN2NyGsbr/zlTev1R2ZGm8jmqJZ3qvDR/xgAOCtmivnw7fMnFEh29ukYV3PIfwrouUFy2QFP1AefHz+EBDuxWFybrauec3hCycrXEe8vGwp7R/e4AapmQ5Xwslz6F0XGbzixW0eQm63bqlMcGueD4DP3cnxc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (40.139.113.210) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Sun, 13 Nov 2016 20:59:29 +0000 Date: Mon, 14 Nov 2016 02:29:24 +0530 From: Jerin Jacob To: Hemant Agrawal CC: Neil Horman , "dev@dpdk.org" , "users@dpdk.org" , "Jacob, Jerin" , Jan Viktorin Message-ID: <20161113205924.GA11392@localhost.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [40.139.113.210] X-ClientProxiedBy: CY1PR18CA0027.namprd18.prod.outlook.com (10.163.31.37) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 2:CmjjwTVGJr4JEnwmOBazfrJnisvlbywOrkuvY0cp1w98LczTIUut1uKMaPPjLxpg1rTRWhxkmS7JK9pelAiuMjwPA9RocsW7x1zcPx4nCffqJTyMbJsyryAYXYYZ8MoN+81lSjOIs6YeCPJvIyDrwyzGFBwy7LjhC8nqrByYVag=; 3:kuSac5US4W9omte8o9cqJVEOjbtaSzJ3OuuXdkklZCo8Q3cYZxDmh7SWfQJ2606CcLlvg3jcDSwH8yseQ4v4IUC/kRLPfFAdIGTWhSExTlHte0APkZaEYlLGmQOx9CAlm51leB9OwPppa2jFThItQwtUikTXLk+Sbvcn6TCHbjs=; 25:CKJoLsQH8h6rRqFk2QcbpZhwhb46UPFFbiJHbwaIHe4yV27SU4yGAnC/spSr9lNbsVwciVMXmj7VjuswkMLBdLvieSiBxxrDKNQM1ZbwxMX/LbQJ0KnaWNQDYAENGECHhgzEeNuKNnql7wccvr1kcQGkBhN4Aa2SDYTFGwsgEmRcj2/ADHtuS5GDAe3kknQ+ru9D8cMj+ZyO1LKaq0kSgMsRXMAz489uLObKOEK+ADNu396/8WS0Mw0RbobwduqAtj8HAUJFFtlaFaXxaWLZ/eHOuHkRKhM14KYmeOBulypdHWK84Ujy49BxLMcAz4bUYgKfdkwWlbnUXSvNWXfGrRO6UKkFRsYk7wZ4559OAmvv+sp/FeUzhIBMBLuB3217ysayoLwoOsC90CsTHllIMdHjrnei0K7BIP8855Iza/xFklfHBrUAFPG+bP4dMJdC X-MS-Office365-Filtering-Correlation-Id: 77ef4b2c-e06f-4068-056d-08d40c07f6c0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:5r/hIMnynJsC44gWtXHRbD+DqIVIGmtyX82q17Gzwg/37bd+RQqbZVbdJT9wLAH2TbuIIX8PNv0f1CRekjJsvM1RlzBbkhpAAAMXZ53Hh8uPBO5DtQzudhhyqGNAjbeibh40RXl2ayxSd/RHbV47W3efzDerK5tVjLkmsuBZ2gATNYgvuARsbl+OOfqFqz0GuO5f5qKvgF4RhI8xDqQU6eg1MCKXmQhuTEB0q6bQ3H4LnsosZHXkN4AmpN2DImNo; 20:vDn/bzOmsda64pLlmJwfZDkQd9EofyIlATP/tyjNVUgGulrKJeQFOloCOGLiXjlgF7zR8FIeVd/g0+uLq9SBptq1h1G7tvH1IWgdRKwQskTTAHpFsSwaTqu1Ei5oOSHqgc3CEjd4ZS/0KySMjVEZVLevfokRQzG6++6qUmamYsFgAAnVsPrzjaXEOInwIR5WZ5r3/QTy3LbrEMJuZRFAfF+QlvG5QvuQXj/iNCUXurASf8WssC/APp15ntMWC4VC25n/zdk03GKmGKGW4b7k9eg+yHRuMAaU8RenAmD0yLn1ZFWRNxVzESXU9il4P1x28abUGZRd41tqJuMGILkWDxS3hajphF+rYPeqdXAdjw8pvbtq9lo1nPrel1B5pahs9SC6uE7ZatixrqPiTQyTFnf/rvvJlZ8Kav/WwwI/NBLGRpJQV6jywu9G+0ei7nQzvtgOpnbIaE5CqTAlKGzzQdvboHe7iGQEUOdITLdxauYivgvbPxqLfkFsqYawjzQhnibK/61QnYDMYVCkwOmh/hvIdneKYDmeFUmS08dqjyxyEEg2XDWvwvWKakaXQKOZk5SDaAvUOVNaaDpj2uulT0BYTacZgCZ2o7Ig6Ut1BXw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:nnuEuSlT6XrK8BxHyq40j1aMY61rNvoykB3Vl398deU0N+snhJo5zLZzl+Qyccb7t7RBwWIaVEkNgT1jjF2+Ir05aOyv3UAH31tjH7zSzlY5tDUkEyvg/X/XdbZIWiRSLFwXJ4gIy5fOLd/3KBQHzlFFVEGwLtPhcyHOP3Sncn0c9Kaxvadcvsv3uC58Rg0pvZ4FpVUJMOmn+/ocBJ3vEWs/2k+B07Tfiof4ZlRGpLjxlRJV1iKsbksrrAZbJYRLw+OQpL2PaErTei7crCVYkkgEj/h4+t0ArMHFFuafKMLItKNE6S7ah7QSb18iFfWQoT0BvFaFMo78JiHVDlEyDBspqRN+PB9bN0X8bYIWqm+P7HjBjn1JOzp9nLGz/QsgU4XdaUWf3+9hEY2USuVRSA== X-Forefront-PRVS: 012570D5A0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(24454002)(199003)(189002)(23676002)(586003)(3846002)(81156014)(9686002)(6666003)(2950100002)(42882006)(8676002)(81166006)(66066001)(189998001)(229853002)(305945005)(61506002)(83506001)(50466002)(1076002)(77096005)(2870700001)(7846002)(6116002)(76176999)(54356999)(42186005)(97736004)(8666005)(105586002)(4001350100001)(92566002)(6916009)(101416001)(5660300001)(33656002)(110136003)(106356001)(2906002)(4326007)(68736007)(50986999)(47776003)(7736002)(18370500001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjA3MDFNQjE3MTQ7MjM6NXdqWWJZSmFxd3lId0dTWkZScERham0r?= =?utf-8?B?WVJRcmtrWnVHVmFST3g2cjlXeGwrMHN2Mkd2S1JhZDVJUG1jNE5QeTNFekor?= =?utf-8?B?bFI5V3NzQVpaRzcxTnFlcmFTUklPaWZyNGlWWk81MGtYUXdoa3hHSTlNcXF5?= =?utf-8?B?LzYwd0Ywb2ptN0JTRm1abG5CVWxXUDJ6RUlnL051Q1psSm0wZUhYZ0JvNHht?= =?utf-8?B?UVdQR2dJbEVaVTln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a5TQ3sFi1sLWBsubW2/UJYi1CnRumcPXv+pXv69vnNs00TOrbZBArt5NA+ofQX1laEijlmFMXw3/Dte8mmqqIo2sGRrGFJsAvghVBBxQ==; 24:XQBXkXHHsGwigdpBRWlIEWzAg40k3tL88qeyrIovMpuXhW0ROQai6GkIX6uVdj5aO3IyBmtHHG3WH0EgucPpWwasxjfCoiJWT7WEIeQoGQc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:QcrnDMk+v00YZ4XdgCot94vzt5tc7P2cKdArmIyDwNhSWef/tLTxN60pzNcQwvdVWCqrgD9A8flCper9rtPxcthH6Yv6kujQnwcbNbfd9bKP7mujdPm0AFMwpPPP0NgV3OGKmKfAdXyVbPg+7wrQEjhxpkxEWTdMUHmIPrNIJu17v/uRlJtqjIItbcFPA+otoPCjF3W8XGQDkNcIPQhFijw8TX2FiwcMp2bXJ6s9zSqeY7mKqb1ImhI1YVE18FcOv399R3O6K/r0O2rzOXYDGTXBmuu70idLccB9EpT0tiAzpm/hHqqDYLAYHXUqb4xaM4GBByz4g95GHBhvo0XoIKjEwmqSIXLwHV+lm1Nfw4k= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2016 20:59:29.9166 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-users] pmdinfogen issues: cross compilation for ARM fails with older host compiler X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2016 20:59:33 -0000 On Fri, Nov 11, 2016 at 10:34:39AM +0000, Hemant Agrawal wrote: > Hi Neil, > Pmdinfogen compiles with host compiler. It usages rte_byteorder.h of the target platform. > However, if the host compiler is older than 4.8, it will be an issue during cross compilation for some platforms. > e.g. if we are compiling on x86 host for ARM, x86 host compiler will not understand the arm asm instructions. > > /* fix missing __builtin_bswap16 for gcc older then 4.8 */ > #if !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) > static inline uint16_t rte_arch_bswap16(uint16_t _x) > { > register uint16_t x = _x; > asm volatile ("rev16 %0,%1" > : "=r" (x) > : "r" (x) > ); > return x; > } > #endif > > One easy solution is that we add compiler platform check in this code section of rte_byteorder.h > e.g > #if !(defined __arm__ || defined __aarch64__) > static inline uint16_t rte_arch_bswap16(uint16_t _x) > { > return (_x >> 8) | ((_x << 8) & 0xff00); > } > #else …. > > Is there a better way to fix it? IMO, It is a HOST build infrastructure issue. If a host app is using the dpdk service then it should compile and link against HOST target(in this specific case, build/x86_64-native-linuxapp-gcc). I think, introducing the HOSTTARGET kind of scheme is a clean solution. /Jerin