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 530BB2BB9; Wed, 4 Jan 2017 06:44:42 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP; 03 Jan 2017 21:44:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,458,1477983600"; d="scan'208";a="49070843" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga005.jf.intel.com with ESMTP; 03 Jan 2017 21:44:40 -0800 Date: Wed, 4 Jan 2017 13:46:27 +0800 From: Yuanhan Liu To: Jianfeng Tan Cc: dev@dpdk.org, ferruh.yigit@intel.com, cunming.liang@intel.com, stable@dpdk.org Message-ID: <20170104054627.GF21228@yliu-dev.sh.intel.com> References: <1483502366-140154-1-git-send-email-jianfeng.tan@intel.com> <1483502366-140154-3-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1483502366-140154-3-git-send-email-jianfeng.tan@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 2/7] net/virtio_user: fix not properly reset device 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: Wed, 04 Jan 2017 05:44:44 -0000 On Wed, Jan 04, 2017 at 03:59:21AM +0000, Jianfeng Tan wrote: > virtio_user is not properly reset when users call vtpci_reset(), > as it ignores VIRTIO_CONFIG_STATUS_RESET status in > virtio_user_set_status(). > > This might lead to initialization failure as it starts to re-init > the device before sending RESET messege to backend. Besides, previous > callfds and kickfds are not closed. > > To fix it, we add support to disable virtqueues when it's set to > DRIVER OK status, and re-init fields in struct virtio_user_dev. > > Fixes: e9efa4d93821 ("net/virtio-user: add new virtual PCI driver") > Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer") > > CC: stable@dpdk.org > > Signed-off-by: Jianfeng Tan Note that, typically, there should be no empty line between 'Cc' and SoB. > --- > drivers/net/virtio/virtio_user/virtio_user_dev.c | 26 ++++++++++++++++-------- > drivers/net/virtio/virtio_user_ethdev.c | 15 ++++++++------ > 2 files changed, 27 insertions(+), 14 deletions(-) > > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c > index 0d7e17b..a38398b 100644 > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c > @@ -182,7 +182,17 @@ virtio_user_start_device(struct virtio_user_dev *dev) > > int virtio_user_stop_device(struct virtio_user_dev *dev) The name doesn't seem to be well named: "dev_stop" comes to my firstly when I saw that :/ Rename it to "xxx_reset_device"? --yliu