From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A71EEA04B3; Mon, 11 Nov 2019 10:03:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C59D02B8E; Mon, 11 Nov 2019 10:03:24 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9CA4C2B87 for ; Mon, 11 Nov 2019 10:03:22 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Nov 2019 01:03:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,292,1569308400"; d="scan'208";a="202277060" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga007.fm.intel.com with ESMTP; 11 Nov 2019 01:03:20 -0800 Date: Mon, 11 Nov 2019 17:00:09 +0800 From: Ye Xiaolong To: "Di, ChenxuX" Cc: "dev@dpdk.org" , "Yang, Qiming" Message-ID: <20191111090009.GD5870@intel.com> References: <20191106050930.82723-1-chenxux.di@intel.com> <20191107062821.32948-1-chenxux.di@intel.com> <20191111084153.GB5870@intel.com> <3B926E44943CB04AA3A39AC16328CE39B6C098@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3B926E44943CB04AA3A39AC16328CE39B6C098@SHSMSX101.ccr.corp.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix device hotplug remove 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/11, Di, ChenxuX wrote: >Hi, > >> -----Original Message----- >> From: Ye, Xiaolong >> Sent: Monday, November 11, 2019 4:42 PM >> To: Di, ChenxuX >> Cc: dev@dpdk.org; Yang, Qiming >> Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix device hotplug remove >> >> On 11/07, Di ChenxuX wrote: >> >testpmd will occur infinite loops when device hotplug remove. >> >We can fix the issue by using the pci generic remove function >> > >> >Fixes: f2f4990eff94 ("net/ixgbe: release port upon close") >> > >> >Signed-off-by: Di ChenxuX >> > >> >v2: >> >reverted the code about ixgbe_vf_representor_uninit. >> >--- >> > drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++-- >> > 1 file changed, 3 insertions(+), 2 deletions(-) >> > >> >diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c >> b/drivers/net/ixgbe/ixgbe_ethdev.c >> >index dbce7a80e..7ec55a4de 100644 >> >--- a/drivers/net/ixgbe/ixgbe_ethdev.c >> >+++ b/drivers/net/ixgbe/ixgbe_ethdev.c >> >@@ -1800,12 +1800,13 @@ static int eth_ixgbe_pci_remove(struct >> rte_pci_device *pci_dev) >> > >> > ethdev = rte_eth_dev_allocated(pci_dev->device.name); >> > if (!ethdev) >> >- return -ENODEV; >> >+ return 0; >> > >> > if (ethdev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR) >> > return rte_eth_dev_destroy(ethdev, >> ixgbe_vf_representor_uninit); >> >> Can we use rte_eth_dev_pci_generic_remove for vf representor as well? >> > >I think it can be used. Should I do it and send a new patch? Yes, please send a new patch after verification, and don't forget to remove rte_eth_dev_allocated check int eth_ixgbe_pci_remove, since it has been contained in rte_eth_dev_pci_generic_remove. Same for i40e patch. Thanks, Xiaolong > >Thx >Di Chenxu > >> Thanks, >> Xiaolong >> > else >> >- return rte_eth_dev_destroy(ethdev, eth_ixgbe_dev_uninit); >> >+ return rte_eth_dev_pci_generic_remove(pci_dev, >> >+ eth_ixgbe_dev_uninit); >> > } >> > >> > static struct rte_pci_driver rte_ixgbe_pmd = { >> >-- >> >2.17.1 >> >