From patchwork Sat Nov 5 09:41:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuanhan Liu X-Patchwork-Id: 16949 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 351B45598; Sat, 5 Nov 2016 10:41:24 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 04456137C for ; Sat, 5 Nov 2016 10:40:27 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 05 Nov 2016 02:40:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,448,1473145200"; d="scan'208";a="187945152" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga004.fm.intel.com with ESMTP; 05 Nov 2016 02:40:25 -0700 From: Yuanhan Liu To: dev@dpdk.org Cc: Thomas Monjalon , Tan Jianfeng , Kevin Traynor , Ilya Maximets , Kyle Larose , Maxime Coquelin , Yuanhan Liu Date: Sat, 5 Nov 2016 17:41:02 +0800 Message-Id: <1478338865-26126-8-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1478338865-26126-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1478189400-14606-1-git-send-email-yuanhan.liu@linux.intel.com> <1478338865-26126-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-dev] [PATCH v2 07/10] net/virtio: complete init stage at the right place 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Invoking vtpci_reinit_complete() at port start stage doesn't make any sense, instead, it should be done at the end of dev init stage. So move it here. Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index a3e2aa9..15c48b9 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1277,6 +1277,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features) ret = virtio_alloc_queues(eth_dev); if (ret < 0) return ret; + vtpci_reinit_complete(hw); if (pci_dev) PMD_INIT_LOG(DEBUG, "port %d vendorID=0x%x deviceID=0x%x", @@ -1497,8 +1498,6 @@ virtio_dev_start(struct rte_eth_dev *dev) if (hw->started) return 0; - vtpci_reinit_complete(hw); - hw->started = 1; /*Notify the backend