From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0087.outbound.protection.outlook.com [157.56.112.87]) by dpdk.org (Postfix) with ESMTP id 3C25AC534 for ; Wed, 29 Jul 2015 03:11:21 +0200 (CEST) Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none; 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; Wed, 29 Jul 2015 01:11:18 +0000 From: Tony Lu To: 'Thomas Monjalon' References: <1438073298-24683-1-git-send-email-zlu@ezchip.com> <1777834.Cdb59hv0LG@xps13> In-Reply-To: <1777834.Cdb59hv0LG@xps13> Date: Wed, 29 Jul 2015 09:10:47 +0800 Message-ID: <002a01d0c99b$7acb6bd0$70624370$@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: AdDJFncy1cwXiuvQR8aR3Z5HRQoXUQAhJbhg Content-Language: zh-cn X-Originating-IP: [124.207.145.166] X-ClientProxiedBy: SIXPR01CA0027.apcprd01.prod.exchangelabs.com (25.163.105.155) To AM2PR02MB0804.eurprd02.prod.outlook.com (25.163.146.24) X-Microsoft-Exchange-Diagnostics: 1; AM2PR02MB0804; 2:0I1Ts2JpyHyeg5Cfpb8NH2ngjIk7T3m58Nxbfpqk7rXiBitK8tRnQeLQi+df2h+RB7acJZsxgwGImVTN5IJ5ANz8zNaCeDJnPdF5N//KSXqOI8rdG+vhUq13ebO6jOUZNbTQSNRhy3Ih+iddbGtVI/7/FcchQTiTtXxWFn1S3cM=; 3:5Lh+ar/7wysKvpxMHHPX+g+x0PypTDCY5OTKVK9TZnkkisMqS5oWTBaS9qqpfLo4guS1F5KXwaZAgmi/VnKxMt7UH11ceM+nEe95wGvfvhdFouuc7kbLE/PzPsi+kRjz99xlsv/yXE1qzCORR1tXAw==; 25:Rw+Yb2vZYi6cZ9toQJ6UbPJ/R4o4hUcGyOx//KP2FRvucJ/GzRl/QawGRDZGvdyWUXSwZCntvkgTxSo2/oT6c32P5NO55o0jZxf5oSpNv9oeQXcevRQPSKfhy2GvaCcmE0CaAGmW55Y4Ps8stocOHF8xf2FnlFkUVRYUDvsJFj7AhDvYeSY4s97VlJlmrtnRDrF9qgTnXXeiH3k9fpf0fwPNt8PX1s4zNh6fI1ipZ3RPgMuF5TygxiD47ZCpBU+a; 20:jB8cdvo7KLAE5LcbptliCZldoW/tSm6cEzWj618baX6/ZYuAIbqD3Juj/Wm4o8sMk20AuAQRwxCQ0PahQKxn8JDhPaN7/OZ/XFngmyHJjEtcAeYnP/EzQX88m5Bemh5tuDQXEwJVg3iNlyIU6n1f8IFoLzEY0OEoqX0TH5kTYPs= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0804; AM2PR02MB0804: X-MS-Exchange-Organization-RulesExecuted 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:8TD8oRR8cX1aEDbl2YUb5mHQ8IF5hhi/TqP1Wb+FSiqM3NXFrl6n+MoR6L5G2yA9IbWPlun+kowv+f86l8081gSoyeyFhgGpNKDCNOTN4EMGVbZ8B05c3rvI3KiNse248UA/ilCHMiMIkMgUIMDhdVbv1wpc4NeJ8ujK/mTYexU36p/IdKbJMayaJGQOeqviWYt8SG7C/WlDg0SSCvHXTWkag4ImlVIXaKqlEPxWB8jrnvQJBg3Avb/GG4M9PfF9aq4GcNpIuLpglXJTtKlkbnKxAX8eFrCiGrRg66L8g0I= X-Forefront-PRVS: 0652EA5565 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(52604005)(13464003)(377424004)(377454003)(77096005)(33716001)(59696002)(102836002)(62966003)(110136002)(77156002)(46406003)(92566002)(23726002)(40100003)(5001960100002)(76176999)(2950100001)(97756001)(50226001)(50986999)(47776003)(42186005)(61296003)(46102003)(66066001)(14726001)(189998001)(84116002)(33646002)(19580405001)(50466002)(19580395003)(96836002)(2656002)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR02MB0804; H:zhigangTHINK; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR02MB0804; 23:BINC0Gkp74H5IbPm0wnMw8eBjLTALlMSBMu/NPrBv?= =?us-ascii?Q?DqlEu73vR6HX/x0h+1w7dDC/35/6Njv09XBxjtg7+sHzwYBCSLCusvMOzuLm?= =?us-ascii?Q?zGAsb1uNelLhiqGpBnbMKlDfafEdC5dhFpREm3ayyktWjP9CbKSuVTpbeZGF?= =?us-ascii?Q?9FGD8gRqkCFCv+gLWw05ovvOYA6QC/VcHakw/wLHleY7F27912hToTouCAgV?= =?us-ascii?Q?BFHnfNfxgzpuIzBStyq3mOtsN4sGG4A0fDCIrBQCP2bqD7+9HINUCppe/N9O?= =?us-ascii?Q?Nz/BRbi4Zv/lOfdqz1knxLeFLm3bBFY7uLJxFCERpDToxplK0tjevdlfRAH4?= =?us-ascii?Q?ASmiywEQiGitIpu2xzO8uZJXWdfx8nHVvY3082TZicQV656F6bxYmbAPTWql?= =?us-ascii?Q?h32mz73k1+jnbdloQOgupIsSMYT0Pv0NkyaT8k4HWPzvZxPQ1qI0TJPVJCDk?= =?us-ascii?Q?0Bfss2/OPL0/0kl+d3wb73NCfhFXqzPSYGPvofdJAWG0RjDYFo1QS44enzCa?= =?us-ascii?Q?VJqRc2vA3Eo2OJYy97H4iNyjCrw4Z0Z08spK51hGoD2djpeQFNO1JXQVXuQ0?= =?us-ascii?Q?SYFYCjLf+WW/bKULY9IlbVsurAuptq+bZFXsWsIxj8kGMNWfmOhKPV7xDr1B?= =?us-ascii?Q?x6SjZdPN7nKLKQtax1rYeJfh/bHqFpStYaZV4jx62vNT3dtMVHud/uTfCwcA?= =?us-ascii?Q?O1Z5ic4/i64lIlbWh3W3/5TGIWVFcPvo6mPRfaW+sCgB+vF8GcOeG09xIPSu?= =?us-ascii?Q?lQrXdRYldVrkGwIJzLP+g+JKJKbyndN/NQqK0abu6iOq+z4SsdnHxJORIQAX?= =?us-ascii?Q?s76CUYK2rKDblQJnv//Yk/I5+smxlKYLk2s7gdpSY7B9SPIXs03m38WaULon?= =?us-ascii?Q?UNPiqTccVWvTGIazSiRSVnVpUz+JeqLdP39afixdOw+DK4wToOMQdxidmex+?= =?us-ascii?Q?svahdJcnIovHeDRcobGGXT6FAoKgul5biDQ45G9Sw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM2PR02MB0804; 5:mKQ5PoHqMrwAFv1BGO9lULvU/wfnyZLPCAyAXME8ZcMEazEuMkOcp7tbcPqSTjJp/jiUDz5yKQhnrjSU07991Jfs4CfTh+Fi2hBKxFOPRse0K15oFXYhJ624jC0w4ye20A8V2JNVjHY/S7sLH9GbzA==; 24:at+ttnDotWcHnVsIj2uySPU30JrtvQloFsL7PG4rzLmLXSw9YbMNtgxfkskQtRthhJxcxWhQSFwNrcsfwoaE0rVmwcZxlnE+7df9gzOg8c8=; 20:avMEp+OWLRNy41vsa2THmFFU+KSQ/7C3guQRF5b2OYgZhWYsbr1Xapo5JPDMDrTLfiA4gl7xQRrqCrmk4axKcQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2015 01:11:18.2098 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR02MB0804 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] bnx2x: fix undeclared PAGE_SIZE build error 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: Wed, 29 Jul 2015 01:11:21 -0000 >-----Original Message----- >From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] >Sent: Tuesday, July 28, 2015 5:18 PM >To: Zhigang Lu >Cc: dev@dpdk.org >Subject: Re: [dpdk-dev] [PATCH] bnx2x: fix undeclared PAGE_SIZE build error > >2015-07-28 16:48, Zhigang Lu: >> This patch fixes a build error caused by undeclared PAGE_SIZE when >> compiling for non-X86 arches. On some arches, PAGE_SIZE is not fixed >> so that header files do not define it. A better way to get it is via >> sysconf(3) or getpagesize(2). >> >> Fixes: 540a211084a7 ("bnx2x: driver core") > >Thanks for fixing it. > >> +#define PAGE_SIZE (sysconf(_SC_PAGESIZE)) > >To avoid conflict with system headers, it would be better to prefix the constant. >Ideally, we should add RTE_PAGESIZE in EAL and cleanup every usage of >sysconf(_SC_PAGESIZE) and getpagesize. Agree, good idea.