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 7DB97A04B3; Mon, 11 Nov 2019 09:50:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 727942B84; Mon, 11 Nov 2019 09:50:42 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 49CBF2B83 for ; Mon, 11 Nov 2019 09:50:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Nov 2019 00:50:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,292,1569308400"; d="scan'208";a="202274986" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga007.fm.intel.com with ESMTP; 11 Nov 2019 00:50:39 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 Nov 2019 00:50:38 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 Nov 2019 00:50:38 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by shsmsx102.ccr.corp.intel.com ([169.254.2.108]) with mapi id 14.03.0439.000; Mon, 11 Nov 2019 16:50:36 +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/1A= Date: Mon, 11 Nov 2019 08:50:35 +0000 Message-ID: <3B926E44943CB04AA3A39AC16328CE39B6C098@SHSMSX101.ccr.corp.intel.com> References: <20191106050930.82723-1-chenxux.di@intel.com> <20191107062821.32948-1-chenxux.di@intel.com> <20191111084153.GB5870@intel.com> In-Reply-To: <20191111084153.GB5870@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" 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 >=20 > 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); >=20 > Can we use rte_eth_dev_pci_generic_remove for vf representor as well? >=20 I think it can be used. Should I do it and send a new patch? 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 > >