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 5F9C5A04B4; Mon, 11 Nov 2019 10:38:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F6552956; Mon, 11 Nov 2019 10:38:11 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id CE2742142 for ; Mon, 11 Nov 2019 10:38:09 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Nov 2019 01:38:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,292,1569308400"; d="scan'208";a="354726956" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 11 Nov 2019 01:38:07 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 Nov 2019 01:38:06 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 11 Nov 2019 01:38:06 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 11 Nov 2019 01:38:05 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.60]) with mapi id 14.03.0439.000; Mon, 11 Nov 2019 17:38:04 +0800 From: "Di, ChenxuX" To: "Ye, Xiaolong" CC: "dev@dpdk.org" , "Yang, Qiming" Thread-Topic: [dpdk-dev] [PATCH v2] net/ixgbe: fix device hotplug remove Thread-Index: AQHVlTw8XZ3q976jLkWhYoHZHMsLtqeFJyeAgACH/1D//30bgIAAj60w Date: Mon, 11 Nov 2019 09:38:03 +0000 Message-ID: <3B926E44943CB04AA3A39AC16328CE39B6C0BA@SHSMSX101.ccr.corp.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> <20191111090009.GD5870@intel.com> In-Reply-To: <20191111090009.GD5870@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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" > -----Original Message----- > From: Ye, Xiaolong > Sent: Monday, November 11, 2019 5:00 PM > To: Di, ChenxuX > Cc: dev@dpdk.org; Yang, Qiming > Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix device hotplug remove >=20 > 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 =3D 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? >=20 > Yes, please send a new patch after verification, and don't forget to remo= ve > rte_eth_dev_allocated check int eth_ixgbe_pci_remove, since it has been > contained in rte_eth_dev_pci_generic_remove. >=20 Ok,I will prepare new patch. however the ethdev->data->dev_flags need to be check, I don't think rte_et= h_dev_allocated=20 Can be removed. Thx Di Chenxu > Same for i40e patch. >=20 > Thanks, > Xiaolong >=20 > > > >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 =3D { > >> >-- > >> >2.17.1 > >> >