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 7B6DEA04C0; Tue, 29 Sep 2020 07:52:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 99CF11BEB7; Tue, 29 Sep 2020 07:52:23 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 2F12F1BEAE for ; Tue, 29 Sep 2020 07:52:20 +0200 (CEST) IronPort-SDR: QU42xIrr4H8h9DU0Z8gaIVK4QEVc4xIlc94kR3yGh+9n8vryy1sRkwEv2QEI9s/zM7Ej0jY9i3 XfUbRArL9Gsg== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="142141945" X-IronPort-AV: E=Sophos;i="5.77,317,1596524400"; d="scan'208";a="142141945" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 22:52:12 -0700 IronPort-SDR: DpQjEfwnVrcPjufxUErus9iBfwd152OXLLbxKBk23wnIiEiMMXWsM95ddo/Law7gt2CMHXyUYd iXyTMynt9U/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,317,1596524400"; d="scan'208";a="307625575" Received: from irsmsx605.ger.corp.intel.com ([163.33.146.138]) by orsmga003.jf.intel.com with ESMTP; 28 Sep 2020 22:52:05 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by IRSMSX605.ger.corp.intel.com (163.33.146.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 29 Sep 2020 06:52:01 +0100 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Tue, 29 Sep 2020 13:52:00 +0800 From: "Guo, Jia" To: Thomas Monjalon , "dev@dpdk.org" CC: "Yigit, Ferruh" , "arybchenko@solarflare.com" , Shepard Siegel , Ed Czeck , John Miller , Igor Russkikh , Pavel Belous , Somalapuram Amaranath , Ajit Khaparde , Somnath Kotur , Chas Williams , "Wei Hu (Xavier)" , Hemant Agrawal , Sachin Saxena , "Wang, Haiyue" , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin , "Zhang, Qi Z" , "Wang, Xiao W" , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , "Min Hu (Connor)" , Yisen Zhuang , "Xing, Beilei" , "Wu, Jingjing" , "Yang, Qiming" , Alfredo Cardigliano , Shijith Thotton , Srisivasubramanian Srinivasan , Stephen Hemminger , "K. Y. Srinivasan" , Haiyang Zhang , "Long Li" , Harman Kalra , Rasesh Mody , Shahed Shaikh , "Wiles, Keith" , Maxime Coquelin , "Xia, Chenbo" , "Wang, Zhihong" , Yong Wang Thread-Topic: [PATCH v3 28/29] ethdev: reset all when releasing a port Thread-Index: AQHWle1bnwQXv8JMIkiL9fRDiv2pmKl/HNhw Date: Tue, 29 Sep 2020 05:51:59 +0000 Message-ID: References: <20200913220711.3768597-1-thomas@monjalon.net> <20200928231437.414489-1-thomas@monjalon.net> <20200928231437.414489-29-thomas@monjalon.net> In-Reply-To: <20200928231437.414489-29-thomas@monjalon.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 28/29] ethdev: reset all when releasing a port 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" For drivers/net/i40e, Acked-by: Jeff Guo > -----Original Message----- > From: Thomas Monjalon > Sent: Tuesday, September 29, 2020 7:15 AM > To: dev@dpdk.org > Cc: Yigit, Ferruh ; arybchenko@solarflare.com; > Shepard Siegel ; Ed Czeck > ; John Miller ; > Igor Russkikh ; Pavel Belous > ; Somalapuram Amaranath > ; Ajit Khaparde ; > Somnath Kotur ; Chas Williams > ; Wei Hu (Xavier) ; Hemant > Agrawal ; Sachin Saxena > ; Guo, Jia ; Wang, Haiyue > ; Marcin Wojtas ; Michal > Krawczyk ; Guy Tzalik ; Evgeny > Schemeilin ; Igor Chauskin ; > Zhang, Qi Z ; Wang, Xiao W > ; Ziyang Xuan ; > Xiaoyun Wang ; Guoyang Zhou > ; Min Hu (Connor) ; > Yisen Zhuang ; Xing, Beilei > ; Wu, Jingjing ; Yang, Qimi= ng > ; Alfredo Cardigliano ; > Shijith Thotton ; Srisivasubramanian Srinivasan > ; Stephen Hemminger > ; K. Y. Srinivasan ; > Haiyang Zhang ; Long Li ; > Harman Kalra ; Rasesh Mody ; > Shahed Shaikh ; Wiles, Keith > ; Maxime Coquelin > ; Xia, Chenbo ; > Wang, Zhihong ; Yong Wang > > Subject: [PATCH v3 28/29] ethdev: reset all when releasing a port >=20 > The function rte_eth_dev_release_port() was resetting partially the struc= t > rte_eth_dev. The drivers were completing it with more pointers set to NUL= L > in the close or remove operations. >=20 > A full memset is done so most of those assignments become useless. >=20 > Signed-off-by: Thomas Monjalon > --- > drivers/net/ark/ark_ethdev.c | 3 --- > drivers/net/atlantic/atl_ethdev.c | 4 ---- > drivers/net/axgbe/axgbe_ethdev.c | 3 --- > drivers/net/bnxt/bnxt_ethdev.c | 4 ---- > drivers/net/bnxt/bnxt_reps.c | 1 - > drivers/net/bonding/rte_eth_bond_pmd.c | 4 ---- > drivers/net/dpaa/dpaa_ethdev.c | 4 ---- > drivers/net/dpaa2/dpaa2_ethdev.c | 4 ---- > drivers/net/e1000/em_ethdev.c | 4 ---- > drivers/net/e1000/igb_ethdev.c | 8 -------- > drivers/net/ena/ena_ethdev.c | 5 ----- > drivers/net/fm10k/fm10k_ethdev.c | 4 ---- > drivers/net/hinic/hinic_pmd_ethdev.c | 4 ---- > drivers/net/hns3/hns3_ethdev.c | 4 ---- > drivers/net/hns3/hns3_ethdev_vf.c | 5 ----- > drivers/net/i40e/i40e_ethdev.c | 4 ---- > drivers/net/i40e/i40e_ethdev_vf.c | 4 ---- > drivers/net/iavf/iavf_ethdev.c | 4 ---- > drivers/net/ice/ice_dcf_ethdev.c | 4 ---- > drivers/net/ice/ice_ethdev.c | 4 ---- > drivers/net/ionic/ionic_ethdev.c | 5 ----- > drivers/net/ixgbe/ixgbe_ethdev.c | 8 -------- > drivers/net/liquidio/lio_ethdev.c | 4 ---- > drivers/net/netvsc/hn_ethdev.c | 4 ---- > drivers/net/octeontx/octeontx_ethdev.c | 3 --- > drivers/net/qede/qede_ethdev.c | 4 ---- > drivers/net/sfc/sfc_ethdev.c | 7 +------ > drivers/net/tap/rte_eth_tap.c | 1 - > drivers/net/virtio/virtio_ethdev.c | 4 ---- > drivers/net/vmxnet3/vmxnet3_ethdev.c | 5 ----- > lib/librte_ethdev/rte_ethdev.c | 5 +---- > 31 files changed, 2 insertions(+), 129 deletions(-) >=20 > diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c > index e3b1347769..cfcfe5c42f 100644 > --- a/drivers/net/ark/ark_ethdev.c > +++ b/drivers/net/ark/ark_ethdev.c > @@ -504,9 +504,6 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev) > ark_pktgen_uninit(ark->pg); > ark_pktchkr_uninit(ark->pc); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > return 0; > } >=20 > diff --git a/drivers/net/atlantic/atl_ethdev.c > b/drivers/net/atlantic/atl_ethdev.c > index 2217511ca0..5cc41c2b61 100644 > --- a/drivers/net/atlantic/atl_ethdev.c > +++ b/drivers/net/atlantic/atl_ethdev.c > @@ -701,10 +701,6 @@ atl_dev_close(struct rte_eth_dev *dev) >=20 > atl_free_queues(dev); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > /* disable uio intr before callback unregister */ > rte_intr_disable(intr_handle); > rte_intr_callback_unregister(intr_handle, > diff --git a/drivers/net/axgbe/axgbe_ethdev.c > b/drivers/net/axgbe/axgbe_ethdev.c > index cf085487cc..39087f36f0 100644 > --- a/drivers/net/axgbe/axgbe_ethdev.c > +++ b/drivers/net/axgbe/axgbe_ethdev.c > @@ -2134,9 +2134,6 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev) > return 0; >=20 > pci_dev =3D RTE_DEV_TO_PCI(eth_dev->device); > - eth_dev->dev_ops =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > axgbe_dev_clear_queues(eth_dev); >=20 > /* disable uio intr before callback unregister */ diff --git > a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index > d45347e8ca..e1c430b2cc 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -1382,10 +1382,6 @@ static int bnxt_dev_close_op(struct rte_eth_dev > *eth_dev) > bnxt_free_pf_info(bp); > bnxt_free_parent_info(bp); >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - > rte_memzone_free((const struct rte_memzone *)bp- > >tx_mem_zone); > bp->tx_mem_zone =3D NULL; > rte_memzone_free((const struct rte_memzone *)bp- > >rx_mem_zone); diff --git a/drivers/net/bnxt/bnxt_reps.c > b/drivers/net/bnxt/bnxt_reps.c index c419fe63b8..d523c867eb 100644 > --- a/drivers/net/bnxt/bnxt_reps.c > +++ b/drivers/net/bnxt/bnxt_reps.c > @@ -225,7 +225,6 @@ int bnxt_vf_representor_uninit(struct rte_eth_dev > *eth_dev) >=20 > PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR uninit\n", eth_dev- > >data->port_id); > eth_dev->data->mac_addrs =3D NULL; > - eth_dev->dev_ops =3D NULL; >=20 > parent_bp =3D rep->parent_dev->data->dev_private; > if (!parent_bp) { > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > b/drivers/net/bonding/rte_eth_bond_pmd.c > index 1f761c7c9e..ce8fe254af 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -2130,10 +2130,6 @@ bond_ethdev_close(struct rte_eth_dev *dev) > */ > rte_mempool_free(internals->mode6.mempool); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > return 0; > } >=20 > diff --git a/drivers/net/dpaa/dpaa_ethdev.c > b/drivers/net/dpaa/dpaa_ethdev.c index a01c8f3fc6..7e6a954d7b 100644 > --- a/drivers/net/dpaa/dpaa_ethdev.c > +++ b/drivers/net/dpaa/dpaa_ethdev.c > @@ -441,10 +441,6 @@ static int dpaa_eth_dev_close(struct rte_eth_dev > *dev) > rte_free(dpaa_intf->tx_queues); > dpaa_intf->tx_queues =3D NULL; >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > return 0; > } >=20 > diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c > b/drivers/net/dpaa2/dpaa2_ethdev.c > index d8624514df..ba99a524f9 100644 > --- a/drivers/net/dpaa2/dpaa2_ethdev.c > +++ b/drivers/net/dpaa2/dpaa2_ethdev.c > @@ -1284,10 +1284,6 @@ dpaa2_dev_close(struct rte_eth_dev *dev) > if (priv->extract.qos_extract_param) > rte_free((void *)(size_t)priv->extract.qos_extract_param); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > DPAA2_PMD_INFO("%s: netdev deleted", dev->data->name); > return 0; > } > diff --git a/drivers/net/e1000/em_ethdev.c > b/drivers/net/e1000/em_ethdev.c index d050eb478a..151b7543d8 100644 > --- a/drivers/net/e1000/em_ethdev.c > +++ b/drivers/net/e1000/em_ethdev.c > @@ -772,10 +772,6 @@ eth_em_close(struct rte_eth_dev *dev) > em_release_manageability(hw); > em_hw_control_release(hw); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > /* disable uio intr before callback unregister */ > rte_intr_disable(intr_handle); > rte_intr_callback_unregister(intr_handle, > diff --git a/drivers/net/e1000/igb_ethdev.c > b/drivers/net/e1000/igb_ethdev.c index cb3d97e2a3..a7fcbaf295 100644 > --- a/drivers/net/e1000/igb_ethdev.c > +++ b/drivers/net/e1000/igb_ethdev.c > @@ -1564,10 +1564,6 @@ eth_igb_close(struct rte_eth_dev *dev) > memset(&link, 0, sizeof(link)); > rte_eth_linkstatus_set(dev, &link); >=20 > - 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); >=20 > @@ -3403,10 +3399,6 @@ igbvf_dev_close(struct rte_eth_dev *dev) > memset(&addr, 0, sizeof(addr)); > igbvf_default_mac_addr_set(dev, &addr); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > rte_intr_callback_unregister(&pci_dev->intr_handle, > eth_igbvf_interrupt_handler, > (void *)dev); > diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c > index 07ae9bab32..b42f12b870 100644 > --- a/drivers/net/ena/ena_ethdev.c > +++ b/drivers/net/ena/ena_ethdev.c > @@ -1933,11 +1933,6 @@ static int eth_ena_dev_uninit(struct rte_eth_dev > *eth_dev) >=20 > ena_destroy_device(eth_dev); >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_prepare =3D NULL; > - > return 0; > } >=20 > diff --git a/drivers/net/fm10k/fm10k_ethdev.c > b/drivers/net/fm10k/fm10k_ethdev.c > index 17cf0328c6..2d51f50faa 100644 > --- a/drivers/net/fm10k/fm10k_ethdev.c > +++ b/drivers/net/fm10k/fm10k_ethdev.c > @@ -2801,10 +2801,6 @@ fm10k_dev_close(struct rte_eth_dev *dev) > fm10k_dev_queue_release(dev); > fm10k_stop_hw(hw); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > /* disable uio/vfio intr */ > rte_intr_disable(intr_handle); >=20 > diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c > b/drivers/net/hinic/hinic_pmd_ethdev.c > index c5b06fae73..57084e59c1 100644 > --- a/drivers/net/hinic/hinic_pmd_ethdev.c > +++ b/drivers/net/hinic/hinic_pmd_ethdev.c > @@ -3222,10 +3222,6 @@ static int hinic_dev_uninit(struct rte_eth_dev > *dev) >=20 > hinic_dev_close(dev); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > rte_free(nic_dev->mc_list); >=20 > return HINIC_OK; > diff --git a/drivers/net/hns3/hns3_ethdev.c > b/drivers/net/hns3/hns3_ethdev.c index dd03bd62b2..ba40d489d6 100644 > --- a/drivers/net/hns3/hns3_ethdev.c > +++ b/drivers/net/hns3/hns3_ethdev.c > @@ -5721,10 +5721,6 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev) > if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > return -EPERM; >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_prepare =3D NULL; > if (hw->adapter_state < HNS3_NIC_CLOSING) > hns3_dev_close(eth_dev); >=20 > diff --git a/drivers/net/hns3/hns3_ethdev_vf.c > b/drivers/net/hns3/hns3_ethdev_vf.c > index 436d864b5f..6a04cd9c2c 100644 > --- a/drivers/net/hns3/hns3_ethdev_vf.c > +++ b/drivers/net/hns3/hns3_ethdev_vf.c > @@ -2728,11 +2728,6 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev) > if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > return -EPERM; >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_prepare =3D NULL; > - > if (hw->adapter_state < HNS3_NIC_CLOSING) > hns3vf_dev_close(eth_dev); >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index feeed2dec0..a05d29dcfc 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -2692,10 +2692,6 @@ i40e_dev_close(struct rte_eth_dev *dev) > (reg | I40E_PFGEN_CTRL_PFSWR_MASK)); > I40E_WRITE_FLUSH(hw); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > /* Clear PXE mode */ > i40e_clear_pxe_mode(hw); >=20 > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > b/drivers/net/i40e/i40e_ethdev_vf.c > index 4d6510d1ff..2001854ae6 100644 > --- a/drivers/net/i40e/i40e_ethdev_vf.c > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > @@ -2421,10 +2421,6 @@ i40evf_dev_close(struct rte_eth_dev *dev) > i40e_shutdown_adminq(hw); > i40evf_disable_irq0(hw); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > rte_free(vf->vf_res); > vf->vf_res =3D NULL; > rte_free(vf->aq_resp); > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethde= v.c > index a5b1433306..02391acfd1 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -1483,10 +1483,6 @@ iavf_dev_close(struct rte_eth_dev *dev) > iavf_dev_interrupt_handler, dev); > iavf_disable_irq0(hw); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { > if (vf->rss_lut) { > rte_free(vf->rss_lut); > diff --git a/drivers/net/ice/ice_dcf_ethdev.c > b/drivers/net/ice/ice_dcf_ethdev.c > index 33dd0c44f2..f2056e2aba 100644 > --- a/drivers/net/ice/ice_dcf_ethdev.c > +++ b/drivers/net/ice/ice_dcf_ethdev.c > @@ -855,10 +855,6 @@ ice_dcf_dev_close(struct rte_eth_dev *dev) > if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > return 0; >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > ice_dcf_uninit_parent_adapter(dev); > ice_dcf_uninit_hw(dev, &adapter->real_hw); >=20 > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c > index 73af19ce81..4f977bd4c4 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -2463,10 +2463,6 @@ ice_dev_close(struct rte_eth_dev *dev) > rte_free(pf->proto_xtr); > pf->proto_xtr =3D NULL; >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > /* disable uio intr before callback unregister */ > rte_intr_disable(intr_handle); >=20 > diff --git a/drivers/net/ionic/ionic_ethdev.c > b/drivers/net/ionic/ionic_ethdev.c > index ef7d06e526..1387253dc8 100644 > --- a/drivers/net/ionic/ionic_ethdev.c > +++ b/drivers/net/ionic/ionic_ethdev.c > @@ -1065,11 +1065,6 @@ eth_ionic_dev_uninit(struct rte_eth_dev > *eth_dev) > ionic_lif_deinit(lif); > ionic_lif_free(lif); >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_prepare =3D NULL; > - > return 0; > } >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 84c1b0f7a1..be8a79009d 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -3009,10 +3009,6 @@ ixgbe_dev_close(struct rte_eth_dev *dev) > /* reprogram the RAR[0] in case user changed it. */ > ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > /* Unlock any pending hardware semaphore */ > ixgbe_swfw_lock_reset(hw); >=20 > @@ -5460,10 +5456,6 @@ ixgbevf_dev_close(struct rte_eth_dev *dev) > **/ > ixgbevf_remove_mac_addr(dev, 0); >=20 > - dev->dev_ops =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - > rte_intr_disable(intr_handle); > rte_intr_callback_unregister(intr_handle, > ixgbevf_dev_interrupt_handler, dev); diff > --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethd= ev.c > index 1a41f27198..9c4da467eb 100644 > --- a/drivers/net/liquidio/lio_ethdev.c > +++ b/drivers/net/liquidio/lio_ethdev.c > @@ -2067,10 +2067,6 @@ lio_eth_dev_uninit(struct rte_eth_dev *eth_dev) > /* lio_free_sc_buffer_pool */ > lio_free_sc_buffer_pool(lio_dev); >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - > return 0; > } >=20 > diff --git a/drivers/net/netvsc/hn_ethdev.c > b/drivers/net/netvsc/hn_ethdev.c index 5ae2d469c8..9af64821a1 100644 > --- a/drivers/net/netvsc/hn_ethdev.c > +++ b/drivers/net/netvsc/hn_ethdev.c > @@ -1049,10 +1049,6 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev) > hn_dev_stop(eth_dev); > hn_dev_close(eth_dev); >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - > hn_detach(hv); > hn_chim_uninit(eth_dev); > rte_vmbus_chan_close(hv->primary->chan); > diff --git a/drivers/net/octeontx/octeontx_ethdev.c > b/drivers/net/octeontx/octeontx_ethdev.c > index aa9ef3bb70..0ea6de448a 100644 > --- a/drivers/net/octeontx/octeontx_ethdev.c > +++ b/drivers/net/octeontx/octeontx_ethdev.c > @@ -513,9 +513,6 @@ octeontx_dev_close(struct rte_eth_dev *dev) >=20 > octeontx_port_close(nic); >=20 > - dev->tx_pkt_burst =3D NULL; > - dev->rx_pkt_burst =3D NULL; > - > return 0; > } >=20 > diff --git a/drivers/net/qede/qede_ethdev.c > b/drivers/net/qede/qede_ethdev.c index cd578709fb..4055c74c2d 100644 > --- a/drivers/net/qede/qede_ethdev.c > +++ b/drivers/net/qede/qede_ethdev.c > @@ -1591,10 +1591,6 @@ static int qede_dev_close(struct rte_eth_dev > *eth_dev) > if (ECORE_IS_CMT(edev)) > rte_eal_alarm_cancel(qede_poll_sp_sb_cb, (void > *)eth_dev); >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - > return 0; > } >=20 > diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c > index 0558f1808d..9ee0b994eb 100644 > --- a/drivers/net/sfc/sfc_ethdev.c > +++ b/drivers/net/sfc/sfc_ethdev.c > @@ -322,11 +322,7 @@ static void > sfc_eth_dev_secondary_clear_ops(struct rte_eth_dev *dev) { > free(dev->process_private); > - dev->process_private =3D NULL; > - dev->dev_ops =3D NULL; > - dev->tx_pkt_prepare =3D NULL; > - dev->tx_pkt_burst =3D NULL; > - dev->rx_pkt_burst =3D NULL; > + rte_eth_dev_release_port(dev); > } >=20 > static int > @@ -378,7 +374,6 @@ sfc_dev_close(struct rte_eth_dev *dev) > /* Required for logging, so cleanup last */ > sa->eth_dev =3D NULL; >=20 > - dev->process_private =3D NULL; > free(sa); >=20 > return 0; > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.= c > index b127ce62dc..0598de00ed 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -1134,7 +1134,6 @@ tap_dev_close(struct rte_eth_dev *dev) > internals->ioctl_sock =3D -1; > } > rte_free(dev->process_private); > - dev->process_private =3D NULL; > if (tap_devices_count =3D=3D 1) > rte_mp_action_unregister(TAP_MP_KEY); > tap_devices_count--; > diff --git a/drivers/net/virtio/virtio_ethdev.c > b/drivers/net/virtio/virtio_ethdev.c > index f2117675b3..3b3b2f6a7e 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -1995,10 +1995,6 @@ eth_virtio_dev_uninit(struct rte_eth_dev > *eth_dev) > virtio_dev_stop(eth_dev); > virtio_dev_close(eth_dev); >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - > PMD_INIT_LOG(DEBUG, "dev_uninit completed"); >=20 > return 0; > diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c > b/drivers/net/vmxnet3/vmxnet3_ethdev.c > index fa950e1ba0..12a782d987 100644 > --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c > +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c > @@ -368,11 +368,6 @@ eth_vmxnet3_dev_uninit(struct rte_eth_dev > *eth_dev) > return -EBUSY; > } >=20 > - eth_dev->dev_ops =3D NULL; > - eth_dev->rx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_burst =3D NULL; > - eth_dev->tx_pkt_prepare =3D NULL; > - > return 0; > } >=20 > diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethde= v.c > index 0b8e8e3e8d..e68943b461 100644 > --- a/lib/librte_ethdev/rte_ethdev.c > +++ b/lib/librte_ethdev/rte_ethdev.c > @@ -554,10 +554,6 @@ rte_eth_dev_release_port(struct rte_eth_dev > *eth_dev) >=20 > rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock); >=20 > - eth_dev->state =3D RTE_ETH_DEV_UNUSED; > - eth_dev->device =3D NULL; > - eth_dev->intr_handle =3D NULL; > - > if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { > rte_free(eth_dev->data->rx_queues); > rte_free(eth_dev->data->tx_queues); > @@ -566,6 +562,7 @@ rte_eth_dev_release_port(struct rte_eth_dev > *eth_dev) > rte_free(eth_dev->data->dev_private); > memset(eth_dev->data, 0, sizeof(struct rte_eth_dev_data)); > } > + memset(eth_dev, 0, sizeof(struct rte_eth_dev)); >=20 > rte_spinlock_unlock(&rte_eth_dev_shared_data->ownership_lock); >=20 > -- > 2.28.0