From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 92CF9559C for ; Tue, 10 Nov 2015 03:21:52 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 09 Nov 2015 18:21:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,268,1444719600"; d="scan'208";a="847180984" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by fmsmga002.fm.intel.com with ESMTP; 09 Nov 2015 18:21:41 -0800 Date: Tue, 10 Nov 2015 10:25:23 +0800 From: Yuanhan Liu To: Rich Lane Message-ID: <20151110022523.GR2326@yliu-dev.sh.intel.com> References: <1447121713-12095-1-git-send-email-rlane@bigswitch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447121713-12095-1-git-send-email-rlane@bigswitch.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] vhost: make destroy callback on VHOST_USER_RESET_OWNER X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 02:21:53 -0000 On Mon, Nov 09, 2015 at 06:15:13PM -0800, Rich Lane wrote: > QEMU sends this message first when shutting down. There was previously no way > for the dataplane to know that the virtio_net instance had become unusable and > it would segfault when trying to do RX/TX. > > Signed-off-by: Rich Lane Thanks. Even I have same patch in my patch queue (I have some other issues to fix), you got my ack. Acked-by: Yuanhan Liu --yliu > --- > lib/librte_vhost/virtio-net.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c > index 14278de..39a6a5e 100644 > --- a/lib/librte_vhost/virtio-net.c > +++ b/lib/librte_vhost/virtio-net.c > @@ -436,6 +436,9 @@ reset_owner(struct vhost_device_ctx ctx) > if (dev == NULL) > return -1; > > + if (dev->flags & VIRTIO_DEV_RUNNING) > + notify_ops->destroy_device(dev); > + > device_fh = dev->device_fh; > cleanup_device(dev); > init_device(dev); > -- > 1.9.1