From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0053.outbound.protection.outlook.com [157.56.112.53]) by dpdk.org (Postfix) with ESMTP id 41372C394 for ; Tue, 4 Aug 2015 02:50:19 +0200 (CEST) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=zlu@ezchip.com; Received: from zhigangTHINK (124.207.145.166) by AM2PR02MB0804.eurprd02.prod.outlook.com (10.163.146.24) with Microsoft SMTP Server (TLS) id 15.1.225.19; Tue, 4 Aug 2015 00:50:16 +0000 From: Tony Lu To: 'Thomas Monjalon' , 'Chao Zhu' References: <1438583517-19035-1-git-send-email-chaozhu@linux.vnet.ibm.com> <1533915.C0IUmFEqd8@xps13> <55BF5161.3000904@linux.vnet.ibm.com> <16563190.8TBxXSHCrU@xps13> In-Reply-To: <16563190.8TBxXSHCrU@xps13> Date: Tue, 4 Aug 2015 08:50:05 +0800 Message-ID: <000101d0ce4f$8abc5140$a034f3c0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdDN4SJE6fJ4PnsgQ+CoOylfWfZrgwAbPWCw Content-Language: zh-cn X-Originating-IP: [124.207.145.166] X-ClientProxiedBy: BLUPR18CA0025.namprd18.prod.outlook.com (25.162.230.35) To AM2PR02MB0804.eurprd02.prod.outlook.com (25.163.146.24) X-Microsoft-Exchange-Diagnostics: 1; AM2PR02MB0804; 2:922PBRxgsCkzJzYi00UTGH6iF9l6jOeYWH2OG6lnnY7E4qdQTWBx0pkYjbNWHbcLUELbyUTT8alzj3p4pugTjXx1YCuop9rwFcY/8HvFn7mFbYuBS1Svo8GgsuKo2ZNowHCLOkJj3KOusLgB8VOiPjwIjlJzTpcCiMI3mU7a5HQ=; 3:1fZ1Q2o4vJONwUmIU5lDWQsjnfA/joftFbH89ZB3KWDEc/8QzpQ13dRP+C06u4hCJNClIDvkqJt1Wzvjqyp49JKwcvbOYmi96n7VCvDSNaEE9GXJ+U5jA2tm1YlrjfSpRYqRcP4f1cme5pBHdiqNOg==; 25:K60ugSR9amlLKqOjBHVSucfgENTl7Si9ecP2UhhLthZH+0vrkLnQlQlpguLsx6nueKeJR24HZM/xE49G+IQY7btO6ush5OlxmQ/ByzBmWvVo3ZIDi9POMfir2fEtjfLiikdsOvn1IMBEHlwTxzBr7Yqno03jDShhoMyL/WkKQK8SQfJQFZDng/TbjCemy1IpUsvfk7lqLQEM93wBTkQv9rb4F+PDwBWasdUKiiV/d6ICxaFo4F6pC4AR5kbJznfj; 20:C2gLg/lB7WJC6DPWxxGIEn5/EmStg+WDBuHJb1zwYoBm3bqYqI+xnXbQ6/K9m1MXHEw2wcUsj4StGRWy1UhvARx3VAtNFgQVFRuN9DGbsNwgOX3HjNgIJ9FPsJI3n15RVX7bdG5dtSMUqpI7s1rMRzDjNT3VhcxUVI8FtpkpWMI= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0804; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:AM2PR02MB0804; BCL:0; PCL:0; RULEID:; SRVR:AM2PR02MB0804; X-Microsoft-Exchange-Diagnostics: 1; AM2PR02MB0804; 4:27aS/2R3203d8p38B2XvuTyi6+w9dTaF6cAyvKGP1+DJ0SfXKN+DvMWzK+lnX8V4EOQGWULBxShEW9ImgF5++fFCA2Mts6zeJZLcKAOumgxxlvLI+1QTEVMVPBO5+2WbD8oFiwXHEACdhAqOF+LX1Ia9NMzeaYWU/MAv2OKj/EJLJ7xr95zwI/h9+EvFOjsdexGBfsvDnyNgyraZPwBuMCkXL8adT+RPHrDGm3VrPtzal8/7dfZ361cipk/ReoxBAUm7mK8noNb7s7M4OtuqGILjQqD4SE8LNXZptMd5PnA= X-Forefront-PRVS: 0658BAF71F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(13464003)(377454003)(189002)(24454002)(479174004)(377424004)(199003)(105586002)(106356001)(92566002)(14726001)(50986999)(81156007)(33646002)(76176999)(5001830100001)(15975445007)(102836002)(5001770100001)(46406003)(5001860100001)(59696002)(97736004)(23726002)(5001960100002)(4001540100001)(2950100001)(1720100001)(77096005)(68736005)(86362001)(87976001)(189998001)(2656002)(77156002)(64706001)(84116002)(66066001)(40100003)(93886004)(122386002)(50226001)(19580395003)(62966003)(19580405001)(33716001)(47776003)(46102003)(97756001)(50466002)(101416001)(96836002)(42186005)(15395725005)(61296003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR02MB0804; H:zhigangTHINK; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: ezchip.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR02MB0804; 23:1wIuHcm78PwUu/uktnRuzVLxUtIYpPDTeIgsY2yBa?= =?us-ascii?Q?5uFhgXks0MOFqVKtOqz+UnlJnyGtLJ84lmP3U51RsCgjnXu9m1+BmEFjZcJO?= =?us-ascii?Q?eBxriYNDw1OHhWgFp8MQgLoZR7vsOuA95l6FSID8L8sFoDEEboQpH029kYoq?= =?us-ascii?Q?84yJ6as8yddn/5vzU9bqZ4bAtev+ZdES7SLMejikxk6DUicdZI6FNNXUGei/?= =?us-ascii?Q?VFwd7J+n9RN0ubP63eK/hr7HGirpDhwZciSLJCCDpHBPlOxjwdZMpWO/vyhW?= =?us-ascii?Q?4jb+ZkuZ+NoBcRWuW8+7VOtRIltl9sxkzP1FxUBoa6yWlkxdOIEtq01usrkQ?= =?us-ascii?Q?VapXDtjqVYNDNzh+To9ZI3NCBRVfEpMqiNRJUDQ5k8k80eK8dt+/5m3bvxU2?= =?us-ascii?Q?P/Hn/41O94nAv6NezFif6AFq4n6RLLVsQixM+hIqbmutnwj9vFzxROCkJE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z5OHhZTOG+a7FgvQbVb5Xv1vXgPS4GMPgJuA1rN?= =?us-ascii?Q?YgAUt1TSuDprLU7shUdLLnzO4e8aP3f1Bufh6DEGml+fwqzeT4LmBYTxfhpL?= =?us-ascii?Q?1QGvrUdEZQIIfhUzHIF/bp/ySZj/f4=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM2PR02MB0804; 5:h7BRbwRc49Ny213DweLH5QRxZij7L4UcC1oueFhAraF7x+qV3BQY9JCFw/9WHYTXXaYzQ0McijpMyHq/sST55qfTavxhrYTvrJim+PiKxfwk3qRMTFshmc0CFPDdLjv3uJHKPrurg2b+0CTQPYgb2A==; 24:F172/eLG9JFpU/R2lS0DM0RqY3RjO0xdAkvSIaV44Ca18a39wHhxLgayN7UvabcUUpJ+p/GlIA324z11jGsh0uY+f3nwK5/e49sQZgAAhaw=; 20:okdQT7sw7l5ZMgj/HKosoRjNIcx9QHHzC7I0b9Qh5SxrNPJSo6sIqb6xyp6Glklog9yeMSo5XDCv9tbpRcEioA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2015 00:50:16.1350 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR02MB0804 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] fm10k: fix the compilation on big endian platforms X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2015 00:50:19 -0000 >-----Original Message----- >From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] >Sent: Monday, August 03, 2015 7:39 PM >To: Chao Zhu >Cc: dev@dpdk.org; Zhigang Lu >Subject: Re: [dpdk-dev] [PATCH] fm10k: fix the compilation on big endian >platforms > >2015-08-03 19:32, Chao Zhu: >> On 2015/8/3 17:06, Thomas Monjalon wrote: >> > 2015-08-03 14:31, Chao Zhu: >> >> The rte_cpu_to_le_32 function can't be used to define const >> >> variables because it has different implementation on big endian >> >> platforms. If doing so, it will cause 'initializer element is not >> >> constant' compiling error. This patch fixes this problem. >> >> --- a/drivers/net/fm10k/base/fm10k_tlv.c >> >> +++ b/drivers/net/fm10k/base/fm10k_tlv.c >> > >> > You cannot change a base driver file except the osdep header where >> > FM10K_CPU_TO_LE32 is defined. >> > >> > I don't understand why it doesn't give you a constant, given this definition: >> > >> > #define rte_bswap32(x) ((uint32_t)(__builtin_constant_p(x) ? \ >> > rte_constant_bswap32(x) : \ >> > rte_arch_bswap32(x))) >> > >> > Have you tried CONFIG_RTE_FORCE_INTRINSICS=y ? >> > It should trigger this definition: >> > >> > #define rte_bswap32(x) __builtin_bswap32(x) >> >> Yes. CONFIG_RTE_FORCE_INTRINSICS=y works on Power Big endian. But if >> I turn off this, the error happens. Seems rte_constant_bswap32 >> doesn't work on Power8? I'll try to check it. > >The tile arch force intrinsics: > http://dpdk.org/browse/dpdk/tree/config/defconfig_tile-tilegx-linuxapp-gcc >#n39 > http://dpdk.org/browse/dpdk/tree/lib/librte_eal/common/include/arch/tile >/rte_byteorder.h#n36 >I don't know wether it was for the same reason. Not really, the reason Tile arch force intrinsics is to reuse some generic functions in lib/librte_eal/common/include/generic/, such as rte_atomic16_cmpset() rte_atomic16_inc() rte_spinlock_lock() .... Thanks -Zhigang