vdpa/mlx5: fix device unplug
authorMatan Azrad <matan@nvidia.com>
Thu, 13 May 2021 18:40:20 +0000 (21:40 +0300)
committerChenbo Xia <chenbo.xia@intel.com>
Tue, 18 May 2021 08:15:19 +0000 (10:15 +0200)
commit2838aa76ba94e0dd7712e57fe6a32651f5690797
tree0741d08e357a85094362b657b76757d155387bad
parent1583ad5b5e3e75285c566b943eda7d7cbb4d2825
vdpa/mlx5: fix device unplug

The vDPA PCI device unplug process should release all the private
device resources and also to unregister the device.

The device unregistration was missed what remained the device data
invalid in the rte_vhost library.

Unregister the device in unplug process via the remove operation.

Fixes: 95276abaaf0a ("vdpa/mlx5: introduce Mellanox vDPA driver")
Cc: stable@dpdk.org
Reported-by: Eli Britstein <elibr@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
Tested-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
drivers/vdpa/mlx5/mlx5_vdpa.c