vdpa/mlx5: retry VAR allocation during vDPA restart
authorXueming Li <xuemingl@nvidia.com>
Fri, 15 Oct 2021 15:05:45 +0000 (23:05 +0800)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 21 Oct 2021 12:24:21 +0000 (14:24 +0200)
commit8011a09adda4d99121bcc0fe34c98356559eb32f
tree6e3a6a7b00be7cd5fb6d2aa820cc597dd5da5492
parentd38a53b175935066b7a7a9c1d632c5f92cea7f5d
vdpa/mlx5: retry VAR allocation during vDPA restart

VAR is the device memory space for the virtio queues doorbells,
Qemu could mmap it to directly to speed up doorbell push.

On a busy system, Qemu takes time to release VAR resources during driver
shutdown. If vdpa restarted quickly, the VAR allocation failed with
error 28 since the VAR is singleton resource per device.

This patch adds retry mechanism for VAR allocation.

Fixes: 4cae722c1b06 ("vdpa/mlx5: move virtual doorbell alloc to probe")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/vdpa/mlx5/mlx5_vdpa.c