On 6/25/20 3:38 PM, Matan Azrad wrote: > Some vDPA drivers' basic configurations should be updated when the > guest memory is hotplugged. > > Close vDPA device before hotplug operation and recreate it after the > hotplug operation is done. > > Signed-off-by: Matan Azrad <ma...@mellanox.com> > --- > lib/librte_vhost/vhost_user.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c > index b90fc78..f690fdb 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -1073,6 +1073,15 @@ > } > > if (dev->mem) { > + if (dev->flags & VIRTIO_DEV_VDPA_CONFIGURED) { > + int did = dev->vdpa_dev_id; > + struct rte_vdpa_device *vdpa_dev = > + rte_vdpa_get_device(did); > + > + if (vdpa_dev && vdpa_dev->ops->dev_close) > + vdpa_dev->ops->dev_close(dev->vid); > + dev->flags &= ~VIRTIO_DEV_VDPA_CONFIGURED; > + } > free_mem_region(dev); > rte_free(dev->mem); > dev->mem = NULL; > Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com> Thanks, Maxime
- Re: [dpdk-dev] [PATCH v1 1/4] vhost: support ... Maxime Coquelin
- Re: [dpdk-dev] [PATCH v1 1/4] vhost: supp... Matan Azrad
- Re: [dpdk-dev] [PATCH v1 1/4] vhost:... Maxime Coquelin
- [dpdk-dev] [PATCH v2 0/5] vhost: improve ready state Matan Azrad
- [dpdk-dev] [PATCH v2 2/5] vhost: improve device readi... Matan Azrad
- Re: [dpdk-dev] [PATCH v2 2/5] vhost: improve devi... Maxime Coquelin
- Re: [dpdk-dev] [PATCH v2 2/5] vhost: improve devi... Xia, Chenbo
- [dpdk-dev] [PATCH v2 1/5] vhost: skip access lock whe... Matan Azrad
- [dpdk-dev] [PATCH v2 3/5] vhost: handle memory hotplu... Matan Azrad
- Re: [dpdk-dev] [PATCH v2 3/5] vhost: handle memor... Maxime Coquelin
- Re: [dpdk-dev] [PATCH v2 3/5] vhost: handle memor... Xia, Chenbo
- [dpdk-dev] [PATCH v2 4/5] vhost: notify virtq file de... Matan Azrad
- Re: [dpdk-dev] [PATCH v2 4/5] vhost: notify virtq... Maxime Coquelin
- Re: [dpdk-dev] [PATCH v2 4/5] vhost: notify virtq... Xia, Chenbo
- [dpdk-dev] [PATCH v2 5/5] vdpa/mlx5: support queue up... Matan Azrad
- Re: [dpdk-dev] [PATCH v2 5/5] vdpa/mlx5: support ... Maxime Coquelin
- [dpdk-dev] [PATCH v3 0/6] vhost: improve ready state Matan Azrad