From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id A4FAB2935 for ; Fri, 28 Apr 2017 07:01:37 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 27 Apr 2017 22:01:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,387,1488873600"; d="scan'208";a="850687193" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by FMSMGA003.fm.intel.com with ESMTP; 27 Apr 2017 22:01:35 -0700 Date: Fri, 28 Apr 2017 12:58:08 +0800 From: Yuanhan Liu To: hanxueluo@126.com Cc: dev@dpdk.org, Huanle Han , Thomas Monjalon , "Yigit, Ferruh" Message-ID: <20170428045808.GS11512@yliu-dev.sh.intel.com> References: <1487599487-12574-1-git-send-email-hanxueluo@126.com> <20170222023423.GN18844@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170222023423.GN18844@yliu-dev.sh.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 1/3] net/virtio: fix dev detachable flag 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: Fri, 28 Apr 2017 05:01:38 -0000 On Wed, Feb 22, 2017 at 10:34:23AM +0800, Yuanhan Liu wrote: > On Mon, Feb 20, 2017 at 10:04:45PM +0800, hanxueluo@126.com wrote: > > From: Huanle Han > > > > The dev detachable flag was removed by > > commit f229eb4 ("net/virtio: fix rewriting LSC flag"). > > > > Signed-off-by: Huanle Han > > --- > > drivers/net/virtio/virtio_ethdev.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > > index 4dc03b9..8465e1a 100644 > > --- a/drivers/net/virtio/virtio_ethdev.c > > +++ b/drivers/net/virtio/virtio_ethdev.c > > @@ -1336,6 +1336,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features) > > if (eth_dev->device) { > > pci_dev = RTE_DEV_TO_PCI(eth_dev->device); > > rte_eth_copy_pci_info(eth_dev, pci_dev); > > + eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; > > This is a partial fix. The major issue here is rte_eth_copy_pci_info has > an undocumented side effect: it resets the dev_flags unconditionally. > > Removing such reset should be able to fix it: it also looks like the right > fix to me. Thomas, Ferruh? > > If not, we could at least call rte_eth_copy_pci_info() at eth_virtio_dev_init(), > before we set any dev_flags bits. This issue has been fixed by http://dpdk.org/dev/patchwork/patch/23949/. --yliu