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 35312A0613 for ; Thu, 26 Sep 2019 05:22:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 06226324D; Thu, 26 Sep 2019 05:22:06 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 427572C36 for ; Thu, 26 Sep 2019 05:22:04 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 20:22:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,550,1559545200"; d="scan'208";a="180027510" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 25 Sep 2019 20:22:03 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Sep 2019 20:22:01 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Sep 2019 20:22:01 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.140]) with mapi id 14.03.0439.000; Thu, 26 Sep 2019 11:21:59 +0800 From: "Di, ChenxuX" To: "Ye, Xiaolong" CC: "dev@dpdk.org" , "Yang, Qiming" Thread-Topic: [dpdk-dev] [PATCH v4 1/5] net/e1000: release port upon close Thread-Index: AQHVbpqqtg1mCaMNbkaBJPQpXV78Z6c8C/8AgAFG+FA= Date: Thu, 26 Sep 2019 03:21:59 +0000 Message-ID: <3B926E44943CB04AA3A39AC16328CE39B4BABB@SHSMSX101.ccr.corp.intel.com> References: <20190827050142.16010-1-chenxux.di@intel.com> <20190919024742.8147-1-chenxux.di@intel.com> <20190919024742.8147-2-chenxux.di@intel.com> <20190925154112.GH60476@intel.com> In-Reply-To: <20190925154112.GH60476@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 v4 1/5] net/e1000: release port upon close 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: Wednesday, September 25, 2019 11:41 PM > To: Di, ChenxuX > Cc: dev@dpdk.org; Yang, Qiming > Subject: Re: [dpdk-dev] [PATCH v4 1/5] net/e1000: release port upon close >=20 > On 09/19, Di ChenxuX wrote: > >Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources > >for the port can be freed by rte_eth_dev_close(). > > > >Signed-off-by: Di ChenxuX > >--- > > doc/guides/rel_notes/release_19_11.rst | 5 + > > drivers/net/e1000/igb_ethdev.c | 144 ++++++++++++------------- >=20 > As I commented before, you also need to do the migration for the em_ethde= v.c. Ok , I will do it in the next version of patch. >=20 > > 2 files changed, 77 insertions(+), 72 deletions(-) > > > >diff --git a/doc/guides/rel_notes/release_19_11.rst > >b/doc/guides/rel_notes/release_19_11.rst > >index 27cfbd9e3..334756906 100644 > >--- a/doc/guides/rel_notes/release_19_11.rst > >+++ b/doc/guides/rel_notes/release_19_11.rst > >@@ -56,6 +56,11 @@ New Features > > Also, make sure to start the actual text at the margin. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > >+* **Updated the Intel drivers.** > >+ > >+ * Added support for the ``RTE_ETH_DEV_CLOSE_REMOVE`` flag for > >+ e1000, fm10k, i40e, ice, ixgbe. > >+ >=20 > I think it makes more scene to separate release notes in respective patch= es, as > this patch just update e1000 pmd. >=20 OK. I will do it in the next version of patch. > > > > Removed Items > > ------------- > >diff --git a/drivers/net/e1000/igb_ethdev.c > >b/drivers/net/e1000/igb_ethdev.c index fec2b4289..c610042c3 100644 > >--- a/drivers/net/e1000/igb_ethdev.c > >+++ b/drivers/net/e1000/igb_ethdev.c > >@@ -843,6 +843,11 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev) > > rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr, > > ð_dev->data->mac_addrs[0]); > > >=20 > [snip] >=20 > > static int > >@@ -1579,14 +1532,13 @@ static void > > eth_igb_close(struct rte_eth_dev *dev) { > > struct e1000_hw *hw =3D E1000_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > >- struct e1000_adapter *adapter =3D > >- E1000_DEV_PRIVATE(dev->data->dev_private); > > struct rte_eth_link link; > > struct rte_pci_device *pci_dev =3D RTE_ETH_DEV_TO_PCI(dev); > > struct rte_intr_handle *intr_handle =3D &pci_dev->intr_handle; > >+ struct e1000_filter_info *filter_info =3D > >+ E1000_DEV_PRIVATE_TO_FILTER_INFO(dev->data- > >dev_private); > > > > eth_igb_stop(dev); > >- adapter->stopped =3D 1; > > > > e1000_phy_hw_reset(hw); > > igb_release_manageability(hw); > >@@ -1610,6 +1562,40 @@ eth_igb_close(struct rte_eth_dev *dev) > > > > memset(&link, 0, sizeof(link)); > > rte_eth_linkstatus_set(dev, &link); > >+ > >+ dev->dev_ops =3D NULL; > >+ dev->rx_pkt_burst =3D NULL; > >+ dev->tx_pkt_burst =3D NULL; > >+ > >+ /* Reset any pending lock */ > >+ igb_reset_swfw_lock(hw); > >+ > >+ /* uninitialize PF if max_vfs not zero */ > >+ igb_pf_host_uninit(dev); > >+ > >+ rte_intr_callback_unregister(intr_handle, > >+ eth_igb_interrupt_handler, dev); >=20 > why rte_intr_disable(intr_handle) is missing here? >=20 rte_intr_disable(intr_handle) has been called in eth_igb_stop(dev). So I de= lete it to prevent the repeat. > >+ [snip] =20 > Ditto. >=20 > Thanks, > Xiaolong >=20 > > } > > > > static void > >-- > >2.17.1 > >