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: 95276abaaf
("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>
This commit is contained in:
parent
1583ad5b5e
commit
2838aa76ba
@ -787,6 +787,8 @@ mlx5_vdpa_pci_remove(struct rte_pci_device *pci_dev)
|
||||
mlx5_glue->dv_free_var(priv->var);
|
||||
priv->var = NULL;
|
||||
}
|
||||
if (priv->vdev)
|
||||
rte_vdpa_unregister_device(priv->vdev);
|
||||
mlx5_glue->close_device(priv->ctx);
|
||||
pthread_mutex_destroy(&priv->vq_config_lock);
|
||||
rte_free(priv);
|
||||
|
Loading…
Reference in New Issue
Block a user