10/06/2020 11:32, Ophir Munk: > Shared function mlx5_devx_cmd_mkey_create() reads the OS pagesize by > calling a Linux API: 'sysconf(_SC_PAGESIZE)'. Wrap this call with a > shared API 'mlx5_os_get_page_size()' which contains the specific OS > implementation. > > Signed-off-by: Ophir Munk <ophi...@mellanox.com>
Sorry, I drop this patch while pulling next-net. > +/** > + * Get OS page size > + * > + * @return > + * OS pagesize > + */ > +size_t > +mlx5_os_get_page_size(void) > +{ > + return sysconf(_SC_PAGESIZE); > +} The same purpose is achieved with rte_mem_page_size(), which was added in EAL recently for Windows memory management. In general, such basic need should not be implemented in a PMD.