vdpa/mlx5: fix virtio queue unset
authorMatan Azrad <matan@mellanox.com>
Mon, 3 Aug 2020 08:25:24 +0000 (08:25 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 5 Aug 2020 16:33:35 +0000 (18:33 +0200)
commit118494d3ad0882a3be77a99457f8659df15756d6
treedd20502202881febf04374e825519783b6c3ec73
parent99abbd62c272bef0a86f8df6a99c3bc5642e6b59
vdpa/mlx5: fix virtio queue unset

When a virtq is destroyed, the SW should be able to continue the virtq
processing from where the HW stopped.

The current destroy behavior in the driver saves the virtq state (used
and available indexes) only when LM is requested.
So, when LM is not requested the queue state is not saved and the SW
indexes stay invalid.

Save the virtq state in the virtq destroy process.

Fixes: bff735011078 ("vdpa/mlx5: prepare virtio queues")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/vdpa/mlx5/mlx5_vdpa.h
drivers/vdpa/mlx5/mlx5_vdpa_virtq.c