On 1/29/20 11:09 AM, Matan Azrad wrote:
> In order to map the guest physical addresses used by the virtio device
> guest side to the host physical addresses used by the HW as the host
> side, memory regions are created.
> 
> By this way, for example, the HW can translate the addresses of the
> packets posted by the guest and to take the packets from the correct
> place.
> 
> The design is to work with single MR which will be configured to the
> virtio queues in the HW, hence a lot of direct MRs are grouped to single
> indirect MR.
> 
> Create functions to prepare and release MRs with all the related
> resources that are required for it.
> 
> Create a new file mlx5_vdpa_mem.c to manage all the MR related code
> in the driver.
> 
> Signed-off-by: Matan Azrad <ma...@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viachesl...@mellanox.com>
> ---
>  drivers/vdpa/mlx5/Makefile        |   4 +-
>  drivers/vdpa/mlx5/meson.build     |   3 +-
>  drivers/vdpa/mlx5/mlx5_vdpa.c     |  11 +-
>  drivers/vdpa/mlx5/mlx5_vdpa.h     |  60 +++++++
>  drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 346 
> ++++++++++++++++++++++++++++++++++++++
>  5 files changed, 413 insertions(+), 11 deletions(-)
>  create mode 100644 drivers/vdpa/mlx5/mlx5_vdpa.h
>  create mode 100644 drivers/vdpa/mlx5/mlx5_vdpa_mem.c
> 

I don't have enough knowledge of Mellanox HW to find any issues in the
mem regions programming, but it looks correct from a C point of view:

Acked-by: Maxime Coquelin <maxime.coque...@redhat.com>

Thanks,
Maxime

Reply via email to