[dpdk-dev] [PATCH v1 7/8] common/mlx5: exclude OS dependency in devx commands

Thomas Monjalon thomas at monjalon.net
Fri Jun 19 00:48:50 CEST 2020


+Cc Ferruh for info

19/06/2020 00:47, Thomas Monjalon:
> 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 <ophirmu at 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.





More information about the dev mailing list