[dpdk-dev] [PATCH v1 42/72] common/mlx5/windows: add DevX UAR getters

Narcisa Ana Maria Vasile navasile at linux.microsoft.com
Wed Nov 11 01:07:31 CET 2020


On Tue, Oct 27, 2020 at 11:23:05PM +0000, Ophir Munk wrote:
> The following getters are added: mlx5_os_get_devx_uar_mmap_offset,
> mlx5_os_get_devx_uar_base_addr, mlx5_os_get_devx_uar_reg_addr,
> mlx5_os_get_devx_uar_page_id.  This commit is the Windows equivalent of
> the Linux implementation in (1).
> 
> (1)
> commit 8638e19a10aa ("net/mlx5: remove more DV dependencies")
> 
> Signed-off-by: Ophir Munk <ophirmu at nvidia.com>
> ---
>  drivers/common/mlx5/windows/mlx5_common_os.h | 74 ++++++++++++++++++++++++++++
>  1 file changed, 74 insertions(+)
> 
> diff --git a/drivers/common/mlx5/windows/mlx5_common_os.h b/drivers/common/mlx5/windows/mlx5_common_os.h
> + * Get mmap offset. Given a pointer to an DevX UAR object of type
> + * 'struct mlx5dv_devx_uar *' - return its mmap offset.
> + *
> + * @param[in] uar
> + *    Pointer to UAR object.
> + *
> + * @return
> + *    The mmap offset if uar is valid, 0 otherwise.
> + */
> +static inline off_t
> +mlx5_os_get_devx_uar_mmap_offset(void *uar)
> +{
> +	if (!uar)
> +		return 0;
> +	return 0;

Should we return uar->mmap_off here?

> +}
> +
> +/**
> + * Get base addr pointer. Given a pointer to an UAR object of type
> + * 'struct mlx5dv_devx_uar *' - return its base address.
> + *


More information about the dev mailing list