From: Yuanhan Liu Date: Sat, 1 Apr 2017 07:22:59 +0000 (+0800) Subject: vhost: do not destroy device on repeat mem table message X-Git-Tag: spdx-start~3879 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=27052cd63f90c516737e4c617df3874197279765;p=dpdk.git vhost: do not destroy device on repeat mem table message It doesn't make any sense to invoke destroy_device() callback at while handling SET_MEM_TABLE message. From the vhost-user spec, it's the GET_VRING_BASE message indicates the end of a vhost device: the destroy_device() should be invoked from there (luckily, we already did that). Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin --- diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 8b12ebb9c2..5c8058b62c 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -504,12 +504,6 @@ vhost_user_set_mem_table(struct virtio_net *dev, struct VhostUserMsg *pmsg) uint32_t i; int fd; - /* Remove from the data plane. */ - if (dev->flags & VIRTIO_DEV_RUNNING) { - dev->flags &= ~VIRTIO_DEV_RUNNING; - dev->notify_ops->destroy_device(dev->vid); - } - if (dev->mem) { free_mem_region(dev); rte_free(dev->mem);