vdpa/mlx5: Allow creation/deletion of any given mr struct
authorDragos Tatulea <dtatulea@nvidia.com>
Wed, 18 Oct 2023 17:14:49 +0000 (20:14 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 1 Nov 2023 13:19:56 +0000 (09:19 -0400)
commit1b3ce9576f169ce2122ab98b39bf2357d377ee5b
tree1b94810a0b2f5d0c6734ee5b9260cd10ab19aaa7
parent07a2da402416891c97335b79a00f23e06549c578
vdpa/mlx5: Allow creation/deletion of any given mr struct

This patch adapts the mr creation/deletion code to be able to work with
any given mr struct pointer. All the APIs are adapted to take an extra
parameter for the mr.

mlx5_vdpa_create/delete_mr doesn't need a ASID parameter anymore. The
check is done in the caller instead (mlx5_set_map).

This change is needed for a followup patch which will introduce an
additional mr for the vq descriptor data.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Acked-by: Eugenio PĂ©rez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231018171456.1624030-12-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Tested-by: Si-Wei Liu <si-wei.liu@oracle.com>
Tested-by: Lei Yang <leiyang@redhat.com>
drivers/vdpa/mlx5/core/mlx5_vdpa.h
drivers/vdpa/mlx5/core/mr.c
drivers/vdpa/mlx5/net/mlx5_vnet.c