From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: [PATCH v2 21/22] vhost: do not destroy device on repeat mem table message Date: Thu, 23 Mar 2017 15:10:58 +0800 Message-ID: <1490253059-28112-22-git-send-email-yuanhan.liu@linux.intel.com> References: <1488534682-3494-1-git-send-email-yuanhan.liu@linux.intel.com> <1490253059-28112-1-git-send-email-yuanhan.liu@linux.intel.com> Cc: Maxime Coquelin , Harris James R , Liu Changpeng , Yuanhan Liu To: dev@dpdk.org Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 68A04695D for ; Thu, 23 Mar 2017 08:13:26 +0100 (CET) In-Reply-To: <1490253059-28112-1-git-send-email-yuanhan.liu@linux.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- lib/librte_vhost/vhost_user.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 40cc973..079c55e 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -496,12 +496,6 @@ 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); -- 1.9.0