From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id CFACCD0A5 for ; Tue, 28 Mar 2017 14:48:32 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 28 Mar 2017 05:48:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,236,1486454400"; d="scan'208";a="65961079" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 28 Mar 2017 05:48:31 -0700 From: Yuanhan Liu To: dev@dpdk.org Cc: Maxime Coquelin , Harris James R , Liu Changpeng , Yuanhan Liu Date: Tue, 28 Mar 2017 20:45:41 +0800 Message-Id: <1490705142-893-22-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1490705142-893-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1490253059-28112-1-git-send-email-yuanhan.liu@linux.intel.com> <1490705142-893-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-dev] [PATCH v3 21/22] vhost: do not destroy device on repeat mem table message X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 12:48:33 -0000 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