Re: [dpdk-dev] [PATCH v6 07/17] drivers: replace page size definitions with function
From: Bruce Richardson <hidden>
Date: 2021-03-01 09:41:15
From: Bruce Richardson <hidden>
Date: 2021-03-01 09:41:15
On Sun, Feb 28, 2021 at 01:53:42PM +0100, Thomas Monjalon wrote:
The page size is often retrieved from the macro PAGE_SIZE. If PAGE_SIZE is not defined, it is either using hard coded default, or getting the system value from the UNIX-only function sysconf(). Such definitions are replaced with the generic function rte_mem_page_size() defined for each supported OS. Removing PAGE_SIZE definitions will fix dlb drivers for musl libc, because #ifdef checks were missing, causing redefinition errors. Signed-off-by: Thomas Monjalon <redacted> ---
Is the header file with the rte_mem_page_size() function missing from this patch? Also, rather than a function for this, would it not be better to keep it as a macro as RTE_PAGE_SIZE, to keep it more in line with the macro people expect to have available?