>-----Original Message----- >From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] >Sent: Tuesday, July 28, 2015 5:18 PM >To: Zhigang Lu >Cc: dev at 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.