vdpa/mlx5: Use vq suspend/resume during .set_map
authorDragos Tatulea <dtatulea@nvidia.com>
Mon, 25 Dec 2023 15:12:01 +0000 (17:12 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 10 Jan 2024 18:01:38 +0000 (13:01 -0500)
commitf756dd3e2a4c704c0ab5ecb143ab71f1249af497
tree475adeb1c331ed63bcfee9b015e26b59ae7354e9
parent60c43b3f6b4eb5a3d672952a0d65991f414ea258
vdpa/mlx5: Use vq suspend/resume during .set_map

Instead of tearing down and setting up vq resources, use vq
suspend/resume during .set_map to speed things up a bit.

The vq mr is updated with the new mapping while the vqs are suspended.

If the device doesn't support resumable vqs, do the old teardown and
setup dance.

Reviewed-by: Gal Pressman <gal@nvidia.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Message-Id: <20231225151203.152687-7-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c
include/linux/mlx5/mlx5_ifc_vdpa.h