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 AFB26A04C0; Tue, 29 Sep 2020 07:56:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 862151C1E7; Tue, 29 Sep 2020 07:56:51 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B0D271C1DC for ; Tue, 29 Sep 2020 07:56:49 +0200 (CEST) IronPort-SDR: SnNzpQSPzDB6ps3gZx9Ys4A23srvSD7A5Ziv8MKi96P98k1vby5/Wgd33+qMYFm4u9UKOBTXeT c20SXH+oAbUw== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="226267125" X-IronPort-AV: E=Sophos;i="5.77,317,1596524400"; d="scan'208";a="226267125" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 22:56:46 -0700 IronPort-SDR: huYElI0TJVp3qvnH2jr6aUBpfv2NYlTQIb904rQy6b/l8VsjCBz8R5Sb1dyMkU2GU2YQCxoGDR zFMpC6pQL+PQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,317,1596524400"; d="scan'208";a="513724152" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga006.fm.intel.com with ESMTP; 28 Sep 2020 22:56:46 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 28 Sep 2020 22:56:45 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) 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 13:56:43 +0800 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:56:43 +0800 From: "Guo, Jia" To: Thomas Monjalon , "dev@dpdk.org" CC: "Yigit, Ferruh" , "arybchenko@solarflare.com" , "Xu, Rosen" , Sachin Saxena , Liron Himi , "John W. Linville" , "Loftus, Ciara" , "Zhang, Qi Z" , Shepard Siegel , Ed Czeck , "John Miller" , Igor Russkikh , Pavel Belous , Steven Webster , Matt Peters , Somalapuram Amaranath , Rasesh Mody , Shahed Shaikh , "Ajit Khaparde" , Somnath Kotur , Chas Williams , "Wei Hu (Xavier)" , Rahul Lakkireddy , Hemant Agrawal , "Wang, Haiyue" , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , "Evgeny Schemeilin" , Igor Chauskin , "Gagandeep Singh" , John Daley , Hyong Youb Kim , Gaetan Rivet , "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 , Jakub Grajciar , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , "Zyta Szpak" , Stephen Hemminger , "K. Y. Srinivasan" , Haiyang Zhang , Long Li , Martin Spinler , Heinrich Kuhn , Harman Kalra , Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , "Akhil Goyal" , "Singh, Jasvinder" , "Dumitrescu, Cristian" , "Wiles, Keith" , Maciej Czekaj , Maxime Coquelin , "Xia, Chenbo" , "Wang, Zhihong" , Yong Wang Thread-Topic: [PATCH v3 02/29] ethdev: allow drivers to return error on close Thread-Index: AQHWle1EDL7PTFgwj0i6L1HgXTE0K6l/HrZg Date: Tue, 29 Sep 2020 05:56:43 +0000 Message-ID: <1c50bda2343945b38680cbbc00f2859c@intel.com> References: <20200913220711.3768597-1-thomas@monjalon.net> <20200928231437.414489-1-thomas@monjalon.net> <20200928231437.414489-3-thomas@monjalon.net> In-Reply-To: <20200928231437.414489-3-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 02/29] ethdev: allow drivers to return error on 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" For drivers/net/i40e, Acked-by: Jeff Guo > -----Original Message----- > From: Thomas Monjalon > Sent: Tuesday, September 29, 2020 7:14 AM > To: dev@dpdk.org > Cc: Yigit, Ferruh ; arybchenko@solarflare.com; Xu= , > Rosen ; Sachin Saxena ; > Liron Himi ; John W. Linville ; > Loftus, Ciara ; Zhang, Qi Z ; > Shepard Siegel ; Ed Czeck > ; John Miller ; > Igor Russkikh ; Pavel Belous > ; Steven Webster > ; Matt Peters > ; Somalapuram Amaranath > ; Rasesh Mody ; Shahed > Shaikh ; Ajit Khaparde > ; Somnath Kotur > ; Chas Williams ; Wei Hu > (Xavier) ; Rahul Lakkireddy > ; Hemant Agrawal > ; Guo, Jia ; Wang, Haiyue > ; Marcin Wojtas ; Michal > Krawczyk ; Guy Tzalik ; Evgeny > Schemeilin ; Igor Chauskin ; > Gagandeep Singh ; John Daley ; > Hyong Youb Kim ; Gaetan Rivet ; > 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 > ; Jakub Grajciar ; Matan > Azrad ; Shahaf Shuler ; > Viacheslav Ovsiienko ; Zyta Szpak > ; Stephen Hemminger ; K. Y. > Srinivasan ; Haiyang Zhang ; > Long Li ; Martin Spinler ; > Heinrich Kuhn ; Harman Kalra > ; Jerin Jacob ; Nithin Dabilpuram > ; Kiran Kumar K ; > Akhil Goyal ; Singh, Jasvinder > ; Dumitrescu, Cristian > ; Wiles, Keith ; > Maciej Czekaj ; Maxime Coquelin > ; Xia, Chenbo ; > Wang, Zhihong ; Yong Wang > > Subject: [PATCH v3 02/29] ethdev: allow drivers to return error on close >=20 > The device operation .dev_close was returning void. > This driver interface is changed to return an int. >=20 > Note that the API rte_eth_dev_close() is still returning void, > although a deprecation notice is pending to change it as well. >=20 > Signed-off-by: Thomas Monjalon > Reviewed-by: Rosen Xu > Reviewed-by: Sachin Saxena > Reviewed-by: Liron Himi > --- > app/test/virtual_pmd.c | 6 ++++-- > drivers/net/af_packet/rte_eth_af_packet.c | 3 ++- > drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +++- > drivers/net/ark/ark_ethdev.c | 6 ++++-- > drivers/net/atlantic/atl_ethdev.c | 6 ++++-- > drivers/net/avp/avp_ethdev.c | 5 +++-- > drivers/net/axgbe/axgbe_ethdev.c | 5 +++-- > drivers/net/bnx2x/bnx2x_ethdev.c | 4 +++- > drivers/net/bnxt/bnxt_ethdev.c | 4 +++- > drivers/net/bnxt/bnxt_reps.c | 3 ++- > drivers/net/bnxt/bnxt_reps.h | 2 +- > drivers/net/bonding/eth_bond_private.h | 2 +- > drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++- > drivers/net/cxgbe/cxgbe_ethdev.c | 10 ++++++---- > drivers/net/cxgbe/cxgbe_pfvf.h | 2 +- > drivers/net/dpaa/dpaa_ethdev.c | 4 +++- > drivers/net/dpaa2/dpaa2_ethdev.c | 6 ++++-- > drivers/net/e1000/em_ethdev.c | 6 ++++-- > drivers/net/e1000/igb_ethdev.c | 12 ++++++++---- > drivers/net/ena/ena_ethdev.c | 6 ++++-- > drivers/net/enetc/enetc_ethdev.c | 4 +++- > drivers/net/enic/enic_ethdev.c | 4 +++- > drivers/net/enic/enic_vf_representor.c | 5 +++-- > drivers/net/failsafe/failsafe_ops.c | 3 ++- > drivers/net/fm10k/fm10k_ethdev.c | 4 +++- > drivers/net/hinic/hinic_pmd_ethdev.c | 6 ++++-- > drivers/net/hns3/hns3_ethdev.c | 6 ++++-- > drivers/net/hns3/hns3_ethdev_vf.c | 6 ++++-- > drivers/net/i40e/i40e_ethdev.c | 5 +++-- > drivers/net/i40e/i40e_ethdev_vf.c | 5 +++-- > drivers/net/iavf/iavf_ethdev.c | 6 ++++-- > drivers/net/ice/ice_dcf_ethdev.c | 6 ++++-- > drivers/net/ice/ice_ethdev.c | 6 ++++-- > drivers/net/igc/igc_ethdev.c | 6 ++++-- > drivers/net/ionic/ionic_ethdev.c | 10 ++++++---- > drivers/net/ipn3ke/ipn3ke_representor.c | 4 +++- > drivers/net/ixgbe/ixgbe_ethdev.c | 11 +++++++---- > drivers/net/kni/rte_eth_kni.c | 4 +++- > drivers/net/liquidio/lio_ethdev.c | 4 +++- > drivers/net/memif/rte_eth_memif.c | 4 +++- > drivers/net/mlx4/mlx4.c | 3 ++- > drivers/net/mlx5/mlx5.c | 9 +++++---- > drivers/net/mlx5/mlx5.h | 2 +- > drivers/net/mvneta/mvneta_ethdev.c | 4 +++- > drivers/net/mvpp2/mrvl_ethdev.c | 4 +++- > drivers/net/netvsc/hn_ethdev.c | 4 +++- > drivers/net/nfb/nfb_ethdev.c | 4 +++- > drivers/net/nfp/nfp_net.c | 6 ++++-- > drivers/net/octeontx/octeontx_ethdev.c | 4 +++- > drivers/net/octeontx2/otx2_ethdev.c | 5 +++-- > drivers/net/pcap/rte_eth_pcap.c | 3 ++- > drivers/net/pfe/pfe_ethdev.c | 8 +++++--- > drivers/net/qede/qede_ethdev.c | 4 +++- > drivers/net/sfc/sfc_ethdev.c | 4 +++- > drivers/net/softnic/rte_eth_softnic.c | 4 ++-- > drivers/net/szedata2/rte_eth_szedata2.c | 4 +++- > drivers/net/tap/rte_eth_tap.c | 4 +++- > drivers/net/thunderx/nicvf_ethdev.c | 4 +++- > drivers/net/vhost/rte_eth_vhost.c | 6 ++++-- > drivers/net/virtio/virtio_ethdev.c | 6 ++++-- > drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 ++++-- > lib/librte_ethdev/rte_ethdev_driver.h | 2 +- > 62 files changed, 206 insertions(+), 103 deletions(-) >=20 > diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c > index b49089a33c..4bd4d1c9ad 100644 > --- a/app/test/virtual_pmd.c > +++ b/app/test/virtual_pmd.c > @@ -62,9 +62,11 @@ static void virtual_ethdev_stop(struct rte_eth_dev > *eth_dev __rte_unused) > rte_pktmbuf_free(pkt); > } >=20 > -static void > +static int > virtual_ethdev_close(struct rte_eth_dev *dev __rte_unused) > -{} > +{ > + return 0; > +} >=20 > static int > virtual_ethdev_configure_success(struct rte_eth_dev *dev __rte_unused) > diff --git a/drivers/net/af_packet/rte_eth_af_packet.c > b/drivers/net/af_packet/rte_eth_af_packet.c > index b9723e9619..7d0ff1cbb3 100644 > --- a/drivers/net/af_packet/rte_eth_af_packet.c > +++ b/drivers/net/af_packet/rte_eth_af_packet.c > @@ -376,9 +376,10 @@ eth_stats_reset(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > +static int > eth_dev_close(struct rte_eth_dev *dev __rte_unused) > { > + return 0; > } >=20 > static void > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > index b65ee449fc..badbce63fb 100644 > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > @@ -701,7 +701,7 @@ xdp_umem_destroy(struct xsk_umem_info *umem) > umem =3D NULL; > } >=20 > -static void > +static int > eth_dev_close(struct rte_eth_dev *dev) > { > struct pmd_internals *internals =3D dev->data->dev_private; > @@ -731,6 +731,8 @@ eth_dev_close(struct rte_eth_dev *dev) > dev->data->mac_addrs =3D NULL; >=20 > remove_xdp_program(internals); > + > + return 0; > } >=20 > static void > diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c > index e13415e95b..5f2ed4b7b7 100644 > --- a/drivers/net/ark/ark_ethdev.c > +++ b/drivers/net/ark/ark_ethdev.c > @@ -30,7 +30,7 @@ static int eth_ark_dev_uninit(struct rte_eth_dev > *eth_dev); > static int eth_ark_dev_configure(struct rte_eth_dev *dev); > static int eth_ark_dev_start(struct rte_eth_dev *dev); > static void eth_ark_dev_stop(struct rte_eth_dev *dev); > -static void eth_ark_dev_close(struct rte_eth_dev *dev); > +static int eth_ark_dev_close(struct rte_eth_dev *dev); > static int eth_ark_dev_info_get(struct rte_eth_dev *dev, > struct rte_eth_dev_info *dev_info); > static int eth_ark_dev_link_update(struct rte_eth_dev *dev, > @@ -676,7 +676,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev) > } > } >=20 > -static void > +static int > eth_ark_dev_close(struct rte_eth_dev *dev) > { > struct ark_adapter *ark =3D dev->data->dev_private; > @@ -706,6 +706,8 @@ eth_ark_dev_close(struct rte_eth_dev *dev) >=20 > rte_free(dev->data->mac_addrs); > dev->data->mac_addrs =3D 0; > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/atlantic/atl_ethdev.c > b/drivers/net/atlantic/atl_ethdev.c > index 2fca9140d7..254758fd66 100644 > --- a/drivers/net/atlantic/atl_ethdev.c > +++ b/drivers/net/atlantic/atl_ethdev.c > @@ -22,7 +22,7 @@ static int atl_dev_start(struct rte_eth_dev *dev); > static void atl_dev_stop(struct rte_eth_dev *dev); > static int atl_dev_set_link_up(struct rte_eth_dev *dev); > static int atl_dev_set_link_down(struct rte_eth_dev *dev); > -static void atl_dev_close(struct rte_eth_dev *dev); > +static int atl_dev_close(struct rte_eth_dev *dev); > static int atl_dev_reset(struct rte_eth_dev *dev); > static int atl_dev_promiscuous_enable(struct rte_eth_dev *dev); > static int atl_dev_promiscuous_disable(struct rte_eth_dev *dev); > @@ -719,7 +719,7 @@ atl_dev_set_link_down(struct rte_eth_dev *dev) > /* > * Reset and stop device. > */ > -static void > +static int > atl_dev_close(struct rte_eth_dev *dev) > { > PMD_INIT_FUNC_TRACE(); > @@ -727,6 +727,8 @@ atl_dev_close(struct rte_eth_dev *dev) > atl_dev_stop(dev); >=20 > atl_free_queues(dev); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c > index 5b47f0924a..2eed6acc3f 100644 > --- a/drivers/net/avp/avp_ethdev.c > +++ b/drivers/net/avp/avp_ethdev.c > @@ -38,7 +38,7 @@ static int avp_dev_create(struct rte_pci_device > *pci_dev, > static int avp_dev_configure(struct rte_eth_dev *dev); > static int avp_dev_start(struct rte_eth_dev *dev); > static void avp_dev_stop(struct rte_eth_dev *dev); > -static void avp_dev_close(struct rte_eth_dev *dev); > +static int avp_dev_close(struct rte_eth_dev *dev); > static int avp_dev_info_get(struct rte_eth_dev *dev, > struct rte_eth_dev_info *dev_info); > static int avp_vlan_offload_set(struct rte_eth_dev *dev, int mask); > @@ -2103,7 +2103,7 @@ avp_dev_stop(struct rte_eth_dev *eth_dev) > rte_spinlock_unlock(&avp->lock); > } >=20 > -static void > +static int > avp_dev_close(struct rte_eth_dev *eth_dev) > { > struct avp_dev *avp =3D AVP_DEV_PRIVATE_TO_HW(eth_dev->data- > >dev_private); > @@ -2139,6 +2139,7 @@ avp_dev_close(struct rte_eth_dev *eth_dev) >=20 > unlock: > rte_spinlock_unlock(&avp->lock); > + return 0; > } >=20 > static int > diff --git a/drivers/net/axgbe/axgbe_ethdev.c > b/drivers/net/axgbe/axgbe_ethdev.c > index 4f5a014b54..458d64bcef 100644 > --- a/drivers/net/axgbe/axgbe_ethdev.c > +++ b/drivers/net/axgbe/axgbe_ethdev.c > @@ -16,7 +16,7 @@ static int axgbe_dev_configure(struct rte_eth_dev > *dev); > static int axgbe_dev_start(struct rte_eth_dev *dev); > static void axgbe_dev_stop(struct rte_eth_dev *dev); > static void axgbe_dev_interrupt_handler(void *param); > -static void axgbe_dev_close(struct rte_eth_dev *dev); > +static int axgbe_dev_close(struct rte_eth_dev *dev); > static int axgbe_dev_promiscuous_enable(struct rte_eth_dev *dev); > static int axgbe_dev_promiscuous_disable(struct rte_eth_dev *dev); > static int axgbe_dev_allmulticast_enable(struct rte_eth_dev *dev); > @@ -410,10 +410,11 @@ axgbe_dev_stop(struct rte_eth_dev *dev) > } >=20 > /* Clear all resources like TX/RX queues. */ > -static void > +static int > axgbe_dev_close(struct rte_eth_dev *dev) > { > axgbe_dev_clear_queues(dev); > + return 0; > } >=20 > static int > diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c > b/drivers/net/bnx2x/bnx2x_ethdev.c > index b2ea5fafa7..73217c2138 100644 > --- a/drivers/net/bnx2x/bnx2x_ethdev.c > +++ b/drivers/net/bnx2x/bnx2x_ethdev.c > @@ -280,7 +280,7 @@ bnx2x_dev_stop(struct rte_eth_dev *dev) > return; > } >=20 > -static void > +static int > bnx2x_dev_close(struct rte_eth_dev *dev) > { > struct bnx2x_softc *sc =3D dev->data->dev_private; > @@ -295,6 +295,8 @@ bnx2x_dev_close(struct rte_eth_dev *dev) >=20 > /* free ilt */ > bnx2x_free_ilt_mem(sc); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/bnxt/bnxt_ethdev.c > b/drivers/net/bnxt/bnxt_ethdev.c > index 05e9a6abbf..e726d078ec 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -1357,7 +1357,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev > *eth_dev) > bp->flow_stat->flow_count =3D 0; > } >=20 > -static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev) > +static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev) > { > struct bnxt *bp =3D eth_dev->data->dev_private; >=20 > @@ -1392,6 +1392,8 @@ static void bnxt_dev_close_op(struct rte_eth_dev > *eth_dev) >=20 > rte_free(bp->grp_info); > bp->grp_info =3D NULL; > + > + return 0; > } >=20 > static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev, > diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c > index 17010f1ee2..2b6c0a277b 100644 > --- a/drivers/net/bnxt/bnxt_reps.c > +++ b/drivers/net/bnxt/bnxt_reps.c > @@ -457,10 +457,11 @@ void bnxt_vf_rep_dev_stop_op(struct > rte_eth_dev *eth_dev) > bnxt_vf_rep_free_rx_mbufs(vfr_bp); > } >=20 > -void bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev) > +int bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev) > { > BNXT_TF_DBG(DEBUG, "BNXT Port:%d VFR close\n", eth_dev->data- > >port_id); > bnxt_vf_representor_uninit(eth_dev); > + return 0; > } >=20 > int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev, > diff --git a/drivers/net/bnxt/bnxt_reps.h b/drivers/net/bnxt/bnxt_reps.h > index 3239e03fc0..d9b9ee2757 100644 > --- a/drivers/net/bnxt/bnxt_reps.h > +++ b/drivers/net/bnxt/bnxt_reps.h > @@ -45,7 +45,7 @@ int bnxt_vf_rep_tx_queue_setup_op(struct > rte_eth_dev *eth_dev, > void bnxt_vf_rep_rx_queue_release_op(void *rx_queue); > void bnxt_vf_rep_tx_queue_release_op(void *tx_queue); > void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev); > -void bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev); > +int bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev); > int bnxt_vf_rep_stats_get_op(struct rte_eth_dev *eth_dev, > struct rte_eth_stats *stats); > int bnxt_vf_rep_stats_reset_op(struct rte_eth_dev *eth_dev); > diff --git a/drivers/net/bonding/eth_bond_private.h > b/drivers/net/bonding/eth_bond_private.h > index c9b2d0fe46..0a0034705d 100644 > --- a/drivers/net/bonding/eth_bond_private.h > +++ b/drivers/net/bonding/eth_bond_private.h > @@ -318,7 +318,7 @@ bond_tlb_activate_slave(struct bond_dev_private > *internals); > void > bond_ethdev_stop(struct rte_eth_dev *eth_dev); >=20 > -void > +int > bond_ethdev_close(struct rte_eth_dev *dev); >=20 > #endif > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > b/drivers/net/bonding/rte_eth_bond_pmd.c > index 4ffd2ca4bb..dff835ef92 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -2095,7 +2095,7 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) > } > } >=20 > -void > +int > bond_ethdev_close(struct rte_eth_dev *dev) > { > struct bond_dev_private *internals =3D dev->data->dev_private; > @@ -2119,6 +2119,8 @@ bond_ethdev_close(struct rte_eth_dev *dev) > bond_flow_ops.flush(dev, &ferror); > bond_ethdev_free_queues(dev); > rte_bitmap_reset(internals->vlan_filter_bmp); > + > + return 0; > } >=20 > /* forward declaration */ > diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c > b/drivers/net/cxgbe/cxgbe_ethdev.c > index 422e190daf..e4bbba5c32 100644 > --- a/drivers/net/cxgbe/cxgbe_ethdev.c > +++ b/drivers/net/cxgbe/cxgbe_ethdev.c > @@ -318,7 +318,7 @@ int cxgbe_dev_mtu_set(struct rte_eth_dev > *eth_dev, uint16_t mtu) > /* > * Stop device. > */ > -void cxgbe_dev_close(struct rte_eth_dev *eth_dev) > +int cxgbe_dev_close(struct rte_eth_dev *eth_dev) > { > struct port_info *temp_pi, *pi =3D eth_dev->data->dev_private; > struct adapter *adapter =3D pi->adapter; > @@ -327,10 +327,10 @@ void cxgbe_dev_close(struct rte_eth_dev > *eth_dev) > CXGBE_FUNC_TRACE(); >=20 > if (!(adapter->flags & FULL_INIT_DONE)) > - return; > + return 0; >=20 > if (!pi->viid) > - return; > + return 0; >=20 > cxgbe_down(pi); > t4_sge_eth_release_queues(pi); > @@ -343,11 +343,13 @@ void cxgbe_dev_close(struct rte_eth_dev > *eth_dev) > for_each_port(adapter, i) { > temp_pi =3D adap2pinfo(adapter, i); > if (temp_pi->viid) > - return; > + return 0; > } >=20 > cxgbe_close(adapter); > rte_free(adapter); > + > + return 0; > } >=20 > /* Start the device. > diff --git a/drivers/net/cxgbe/cxgbe_pfvf.h > b/drivers/net/cxgbe/cxgbe_pfvf.h > index 0b7c52aecf..69d91639e9 100644 > --- a/drivers/net/cxgbe/cxgbe_pfvf.h > +++ b/drivers/net/cxgbe/cxgbe_pfvf.h > @@ -19,7 +19,7 @@ > void cxgbe_dev_rx_queue_release(void *q); > void cxgbe_dev_tx_queue_release(void *q); > void cxgbe_dev_stop(struct rte_eth_dev *eth_dev); > -void cxgbe_dev_close(struct rte_eth_dev *eth_dev); > +int cxgbe_dev_close(struct rte_eth_dev *eth_dev); > int cxgbe_dev_info_get(struct rte_eth_dev *eth_dev, > struct rte_eth_dev_info *device_info); > int cxgbe_dev_promiscuous_enable(struct rte_eth_dev *eth_dev); > diff --git a/drivers/net/dpaa/dpaa_ethdev.c > b/drivers/net/dpaa/dpaa_ethdev.c > index 8a6b19b5ce..7fe06e1830 100644 > --- a/drivers/net/dpaa/dpaa_ethdev.c > +++ b/drivers/net/dpaa/dpaa_ethdev.c > @@ -369,7 +369,7 @@ static void dpaa_eth_dev_stop(struct rte_eth_dev > *dev) > dev->tx_pkt_burst =3D dpaa_eth_tx_drop_all; > } >=20 > -static void dpaa_eth_dev_close(struct rte_eth_dev *dev) > +static int dpaa_eth_dev_close(struct rte_eth_dev *dev) > { > struct fman_if *fif =3D dev->process_private; > struct __fman_if *__fif; > @@ -392,6 +392,8 @@ static void dpaa_eth_dev_close(struct rte_eth_dev > *dev) > dpaa_interrupt_handler, > (void *)dev); > } > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c > b/drivers/net/dpaa2/dpaa2_ethdev.c > index 02daa4d250..fb4165fa03 100644 > --- a/drivers/net/dpaa2/dpaa2_ethdev.c > +++ b/drivers/net/dpaa2/dpaa2_ethdev.c > @@ -1236,7 +1236,7 @@ dpaa2_dev_stop(struct rte_eth_dev *dev) > rte_eth_linkstatus_set(dev, &link); > } >=20 > -static void > +static int > dpaa2_dev_close(struct rte_eth_dev *dev) > { > struct dpaa2_dev_priv *priv =3D dev->data->dev_private; > @@ -1252,11 +1252,13 @@ dpaa2_dev_close(struct rte_eth_dev *dev) > ret =3D dpni_reset(dpni, CMD_PRI_LOW, priv->token); > if (ret) { > DPAA2_PMD_ERR("Failure cleaning dpni device: err=3D%d", > ret); > - return; > + return -1; > } >=20 > memset(&link, 0, sizeof(link)); > rte_eth_linkstatus_set(dev, &link); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/e1000/em_ethdev.c > b/drivers/net/e1000/em_ethdev.c > index 1dc360713a..2d0e071448 100644 > --- a/drivers/net/e1000/em_ethdev.c > +++ b/drivers/net/e1000/em_ethdev.c > @@ -34,7 +34,7 @@ > static int eth_em_configure(struct rte_eth_dev *dev); > static int eth_em_start(struct rte_eth_dev *dev); > static void eth_em_stop(struct rte_eth_dev *dev); > -static void eth_em_close(struct rte_eth_dev *dev); > +static int eth_em_close(struct rte_eth_dev *dev); > static int eth_em_promiscuous_enable(struct rte_eth_dev *dev); > static int eth_em_promiscuous_disable(struct rte_eth_dev *dev); > static int eth_em_allmulticast_enable(struct rte_eth_dev *dev); > @@ -758,7 +758,7 @@ eth_em_stop(struct rte_eth_dev *dev) > } > } >=20 > -static void > +static int > eth_em_close(struct rte_eth_dev *dev) > { > struct e1000_hw *hw =3D E1000_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > @@ -782,6 +782,8 @@ eth_em_close(struct rte_eth_dev *dev) > rte_intr_disable(intr_handle); > rte_intr_callback_unregister(intr_handle, > eth_em_interrupt_handler, dev); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/e1000/igb_ethdev.c > b/drivers/net/e1000/igb_ethdev.c > index 5ab74840aa..9e4aefe00c 100644 > --- a/drivers/net/e1000/igb_ethdev.c > +++ b/drivers/net/e1000/igb_ethdev.c > @@ -77,7 +77,7 @@ static int eth_igb_start(struct rte_eth_dev *dev); > static void eth_igb_stop(struct rte_eth_dev *dev); > static int eth_igb_dev_set_link_up(struct rte_eth_dev *dev); > static int eth_igb_dev_set_link_down(struct rte_eth_dev *dev); > -static void eth_igb_close(struct rte_eth_dev *dev); > +static int eth_igb_close(struct rte_eth_dev *dev); > static int eth_igb_reset(struct rte_eth_dev *dev); > static int eth_igb_promiscuous_enable(struct rte_eth_dev *dev); > static int eth_igb_promiscuous_disable(struct rte_eth_dev *dev); > @@ -155,7 +155,7 @@ static void igbvf_intr_disable(struct e1000_hw *hw); > static int igbvf_dev_configure(struct rte_eth_dev *dev); > static int igbvf_dev_start(struct rte_eth_dev *dev); > static void igbvf_dev_stop(struct rte_eth_dev *dev); > -static void igbvf_dev_close(struct rte_eth_dev *dev); > +static int igbvf_dev_close(struct rte_eth_dev *dev); > static int igbvf_promiscuous_enable(struct rte_eth_dev *dev); > static int igbvf_promiscuous_disable(struct rte_eth_dev *dev); > static int igbvf_allmulticast_enable(struct rte_eth_dev *dev); > @@ -1535,7 +1535,7 @@ eth_igb_dev_set_link_down(struct rte_eth_dev > *dev) > return 0; > } >=20 > -static void > +static int > eth_igb_close(struct rte_eth_dev *dev) > { > struct e1000_hw *hw =3D E1000_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > @@ -1604,6 +1604,8 @@ eth_igb_close(struct rte_eth_dev *dev) >=20 > /* clear all the filters list */ > igb_filterlist_flush(dev); > + > + return 0; > } >=20 > /* > @@ -3381,7 +3383,7 @@ igbvf_dev_stop(struct rte_eth_dev *dev) > adapter->stopped =3D true; > } >=20 > -static void > +static int > igbvf_dev_close(struct rte_eth_dev *dev) > { > struct e1000_hw *hw =3D E1000_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > @@ -3412,6 +3414,8 @@ igbvf_dev_close(struct rte_eth_dev *dev) > rte_intr_callback_unregister(&pci_dev->intr_handle, > eth_igbvf_interrupt_handler, > (void *)dev); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c > index 8077519735..ae6daad892 100644 > --- a/drivers/net/ena/ena_ethdev.c > +++ b/drivers/net/ena/ena_ethdev.c > @@ -187,7 +187,7 @@ static void ena_init_rings(struct ena_adapter > *adapter, > static int ena_mtu_set(struct rte_eth_dev *dev, uint16_t mtu); > static int ena_start(struct rte_eth_dev *dev); > static void ena_stop(struct rte_eth_dev *dev); > -static void ena_close(struct rte_eth_dev *dev); > +static int ena_close(struct rte_eth_dev *dev); > static int ena_dev_reset(struct rte_eth_dev *dev); > static int ena_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats > *stats); > static void ena_rx_queue_release_all(struct rte_eth_dev *dev); > @@ -487,7 +487,7 @@ static void ena_config_debug_area(struct > ena_adapter *adapter) > ena_com_delete_debug_area(&adapter->ena_dev); > } >=20 > -static void ena_close(struct rte_eth_dev *dev) > +static int ena_close(struct rte_eth_dev *dev) > { > struct rte_pci_device *pci_dev =3D RTE_ETH_DEV_TO_PCI(dev); > struct rte_intr_handle *intr_handle =3D &pci_dev->intr_handle; > @@ -513,6 +513,8 @@ static void ena_close(struct rte_eth_dev *dev) > * release of the resource in the rte_eth_dev_release_port(). > */ > dev->data->mac_addrs =3D NULL; > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/enetc/enetc_ethdev.c > b/drivers/net/enetc/enetc_ethdev.c > index c6fb42740d..bdb32762ce 100644 > --- a/drivers/net/enetc/enetc_ethdev.c > +++ b/drivers/net/enetc/enetc_ethdev.c > @@ -545,7 +545,7 @@ enetc_stats_reset(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > +static int > enetc_dev_close(struct rte_eth_dev *dev) > { > uint16_t i; > @@ -564,6 +564,8 @@ enetc_dev_close(struct rte_eth_dev *dev) > dev->data->tx_queues[i] =3D NULL; > } > dev->data->nb_tx_queues =3D 0; > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethde= v.c > index 57e82845a4..ed03d53608 100644 > --- a/drivers/net/enic/enic_ethdev.c > +++ b/drivers/net/enic/enic_ethdev.c > @@ -446,12 +446,14 @@ static void enicpmd_dev_stop(struct rte_eth_dev > *eth_dev) > /* > * Stop device. > */ > -static void enicpmd_dev_close(struct rte_eth_dev *eth_dev) > +static int enicpmd_dev_close(struct rte_eth_dev *eth_dev) > { > struct enic *enic =3D pmd_priv(eth_dev); >=20 > ENICPMD_FUNC_TRACE(); > enic_remove(enic); > + > + return 0; > } >=20 > static int enicpmd_dev_link_update(struct rte_eth_dev *eth_dev, > diff --git a/drivers/net/enic/enic_vf_representor.c > b/drivers/net/enic/enic_vf_representor.c > index 5d34e1b460..c528be2b98 100644 > --- a/drivers/net/enic/enic_vf_representor.c > +++ b/drivers/net/enic/enic_vf_representor.c > @@ -277,11 +277,12 @@ static void enic_vf_dev_stop(struct rte_eth_dev > *eth_dev) > * "close" is no-op for now and solely exists so that rte_eth_dev_close(= ) > * can finish its own cleanup without errors. > */ > -static void enic_vf_dev_close(struct rte_eth_dev *eth_dev __rte_unused) > +static int enic_vf_dev_close(struct rte_eth_dev *eth_dev __rte_unused) > { > ENICPMD_FUNC_TRACE(); > if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > - return; > + return 0; > + return 0; > } >=20 > static int > diff --git a/drivers/net/failsafe/failsafe_ops.c > b/drivers/net/failsafe/failsafe_ops.c > index 96f7e456f9..93ebd09114 100644 > --- a/drivers/net/failsafe/failsafe_ops.c > +++ b/drivers/net/failsafe/failsafe_ops.c > @@ -240,7 +240,7 @@ fs_dev_set_link_down(struct rte_eth_dev *dev) > } >=20 > static void fs_dev_free_queues(struct rte_eth_dev *dev); > -static void > +static int > fs_dev_close(struct rte_eth_dev *dev) > { > struct sub_device *sdev; > @@ -259,6 +259,7 @@ fs_dev_close(struct rte_eth_dev *dev) > } > fs_dev_free_queues(dev); > fs_unlock(dev, 0); > + return 0; > } >=20 > static int > diff --git a/drivers/net/fm10k/fm10k_ethdev.c > b/drivers/net/fm10k/fm10k_ethdev.c > index 5771d83b55..533f976709 100644 > --- a/drivers/net/fm10k/fm10k_ethdev.c > +++ b/drivers/net/fm10k/fm10k_ethdev.c > @@ -2776,7 +2776,7 @@ fm10k_close_mbx_service(struct fm10k_hw *hw) > hw->mbx.ops.disconnect(hw, &hw->mbx); > } >=20 > -static void > +static int > fm10k_dev_close(struct rte_eth_dev *dev) > { > struct fm10k_hw *hw =3D FM10K_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > @@ -2821,6 +2821,8 @@ fm10k_dev_close(struct rte_eth_dev *dev) > rte_intr_callback_unregister(intr_handle, > fm10k_dev_interrupt_handler_vf, (void *)dev); > } > + > + return 0; > } >=20 > static const struct eth_dev_ops fm10k_eth_dev_ops =3D { > diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c > b/drivers/net/hinic/hinic_pmd_ethdev.c > index 67e6afcf7a..5f2e97d3bd 100644 > --- a/drivers/net/hinic/hinic_pmd_ethdev.c > +++ b/drivers/net/hinic/hinic_pmd_ethdev.c > @@ -2936,7 +2936,7 @@ static void hinic_nic_dev_destroy(struct > rte_eth_dev *eth_dev) > * @param dev > * Pointer to Ethernet device structure. > */ > -static void hinic_dev_close(struct rte_eth_dev *dev) > +static int hinic_dev_close(struct rte_eth_dev *dev) > { > struct hinic_nic_dev *nic_dev =3D > HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev); >=20 > @@ -2944,7 +2944,7 @@ static void hinic_dev_close(struct rte_eth_dev > *dev) > &nic_dev->dev_status)) { > PMD_DRV_LOG(WARNING, "Device %s already closed", > dev->data->name); > - return; > + return 0; > } >=20 > /* stop device first */ > @@ -2971,6 +2971,8 @@ static void hinic_dev_close(struct rte_eth_dev > *dev) >=20 > /* deinit nic hardware device */ > hinic_nic_dev_destroy(dev); > + > + return 0; > } >=20 > static const struct eth_dev_ops hinic_pmd_ops =3D { > diff --git a/drivers/net/hns3/hns3_ethdev.c > b/drivers/net/hns3/hns3_ethdev.c > index 73d504253d..3b395a1ccf 100644 > --- a/drivers/net/hns3/hns3_ethdev.c > +++ b/drivers/net/hns3/hns3_ethdev.c > @@ -4859,7 +4859,7 @@ hns3_dev_stop(struct rte_eth_dev *dev) > rte_spinlock_unlock(&hw->lock); > } >=20 > -static void > +static int > hns3_dev_close(struct rte_eth_dev *eth_dev) > { > struct hns3_adapter *hns =3D eth_dev->data->dev_private; > @@ -4868,7 +4868,7 @@ hns3_dev_close(struct rte_eth_dev *eth_dev) > if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { > rte_free(eth_dev->process_private); > eth_dev->process_private =3D NULL; > - return; > + return 0; > } >=20 > if (hw->adapter_state =3D=3D HNS3_NIC_STARTED) > @@ -4888,6 +4888,8 @@ hns3_dev_close(struct rte_eth_dev *eth_dev) > eth_dev->process_private =3D NULL; > hns3_mp_uninit_primary(); > hns3_warn(hw, "Close port %d finished", hw->data->port_id); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/hns3/hns3_ethdev_vf.c > b/drivers/net/hns3/hns3_ethdev_vf.c > index 037a5be7e0..e0ca5a6ac2 100644 > --- a/drivers/net/hns3/hns3_ethdev_vf.c > +++ b/drivers/net/hns3/hns3_ethdev_vf.c > @@ -1910,14 +1910,14 @@ hns3vf_dev_stop(struct rte_eth_dev *dev) > rte_spinlock_unlock(&hw->lock); > } >=20 > -static void > +static int > hns3vf_dev_close(struct rte_eth_dev *eth_dev) > { > struct hns3_adapter *hns =3D eth_dev->data->dev_private; > struct hns3_hw *hw =3D &hns->hw; >=20 > if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > - return; > + return 0; >=20 > if (hw->adapter_state =3D=3D HNS3_NIC_STARTED) > hns3vf_dev_stop(eth_dev); > @@ -1935,6 +1935,8 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev) > eth_dev->process_private =3D NULL; > hns3_mp_uninit_primary(); > hns3_warn(hw, "Close port %d finished", hw->data->port_id); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 563f21d9df..804f0128ab 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -225,7 +225,7 @@ static int eth_i40e_dev_uninit(struct rte_eth_dev > *eth_dev); > static int i40e_dev_configure(struct rte_eth_dev *dev); > static int i40e_dev_start(struct rte_eth_dev *dev); > static void i40e_dev_stop(struct rte_eth_dev *dev); > -static void i40e_dev_close(struct rte_eth_dev *dev); > +static int i40e_dev_close(struct rte_eth_dev *dev); > static int i40e_dev_reset(struct rte_eth_dev *dev); > static int i40e_dev_promiscuous_enable(struct rte_eth_dev *dev); > static int i40e_dev_promiscuous_disable(struct rte_eth_dev *dev); > @@ -2608,7 +2608,7 @@ i40e_dev_stop(struct rte_eth_dev *dev) > pf->adapter->rss_reta_updated =3D 0; > } >=20 > -static void > +static int > i40e_dev_close(struct rte_eth_dev *dev) > { > struct i40e_pf *pf =3D I40E_DEV_PRIVATE_TO_PF(dev->data- > >dev_private); > @@ -2748,6 +2748,7 @@ i40e_dev_close(struct rte_eth_dev *dev) > i40e_tm_conf_uninit(dev); >=20 > hw->adapter_closed =3D 1; > + return 0; > } >=20 > /* > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > b/drivers/net/i40e/i40e_ethdev_vf.c > index 8531cf6b12..61aad8c415 100644 > --- a/drivers/net/i40e/i40e_ethdev_vf.c > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > @@ -90,7 +90,7 @@ static int i40evf_dev_xstats_reset(struct rte_eth_dev > *dev); > static int i40evf_vlan_filter_set(struct rte_eth_dev *dev, > uint16_t vlan_id, int on); > static int i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask); > -static void i40evf_dev_close(struct rte_eth_dev *dev); > +static int i40evf_dev_close(struct rte_eth_dev *dev); > static int i40evf_dev_reset(struct rte_eth_dev *dev); > static int i40evf_check_vf_reset_done(struct rte_eth_dev *dev); > static int i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev); > @@ -2401,7 +2401,7 @@ i40evf_dev_stats_get(struct rte_eth_dev *dev, > struct rte_eth_stats *stats) > return ret; > } >=20 > -static void > +static int > i40evf_dev_close(struct rte_eth_dev *dev) > { > struct i40e_hw *hw =3D I40E_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > @@ -2433,6 +2433,7 @@ i40evf_dev_close(struct rte_eth_dev *dev) > vf->aq_resp =3D NULL; >=20 > hw->adapter_closed =3D 1; > + return 0; > } >=20 > /* > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethde= v.c > index 440da7d76a..8f46c4588f 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -32,7 +32,7 @@ > static int iavf_dev_configure(struct rte_eth_dev *dev); > static int iavf_dev_start(struct rte_eth_dev *dev); > static void iavf_dev_stop(struct rte_eth_dev *dev); > -static void iavf_dev_close(struct rte_eth_dev *dev); > +static int iavf_dev_close(struct rte_eth_dev *dev); > static int iavf_dev_reset(struct rte_eth_dev *dev); > static int iavf_dev_info_get(struct rte_eth_dev *dev, > struct rte_eth_dev_info *dev_info); > @@ -1463,7 +1463,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) > return 0; > } >=20 > -static void > +static int > iavf_dev_close(struct rte_eth_dev *dev) > { > struct iavf_hw *hw =3D IAVF_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > @@ -1506,6 +1506,8 @@ iavf_dev_close(struct rte_eth_dev *dev) >=20 > rte_free(vf->aq_resp); > vf->aq_resp =3D NULL; > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/ice/ice_dcf_ethdev.c > b/drivers/net/ice/ice_dcf_ethdev.c > index 2faed3cc7a..5b626cb641 100644 > --- a/drivers/net/ice/ice_dcf_ethdev.c > +++ b/drivers/net/ice/ice_dcf_ethdev.c > @@ -847,13 +847,13 @@ ice_dcf_stats_reset(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > +static int > ice_dcf_dev_close(struct rte_eth_dev *dev) > { > struct ice_dcf_adapter *adapter =3D dev->data->dev_private; >=20 > if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > - return; > + return 0; >=20 > dev->dev_ops =3D NULL; > dev->rx_pkt_burst =3D NULL; > @@ -861,6 +861,8 @@ ice_dcf_dev_close(struct rte_eth_dev *dev) >=20 > ice_dcf_uninit_parent_adapter(dev); > ice_dcf_uninit_hw(dev, &adapter->real_hw); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c > index cfd357b055..b4ac5e3f81 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -77,7 +77,7 @@ static struct proto_xtr_ol_flag > ice_proto_xtr_ol_flag_params[] =3D { > static int ice_dev_configure(struct rte_eth_dev *dev); > static int ice_dev_start(struct rte_eth_dev *dev); > static void ice_dev_stop(struct rte_eth_dev *dev); > -static void ice_dev_close(struct rte_eth_dev *dev); > +static int ice_dev_close(struct rte_eth_dev *dev); > static int ice_dev_reset(struct rte_eth_dev *dev); > static int ice_dev_info_get(struct rte_eth_dev *dev, > struct rte_eth_dev_info *dev_info); > @@ -2430,7 +2430,7 @@ ice_dev_stop(struct rte_eth_dev *dev) > pf->adapter_stopped =3D true; > } >=20 > -static void > +static int > ice_dev_close(struct rte_eth_dev *dev) > { > struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data- > >dev_private); > @@ -2478,6 +2478,8 @@ ice_dev_close(struct rte_eth_dev *dev) > /* unregister callback func from eal lib */ > rte_intr_callback_unregister(intr_handle, > ice_interrupt_handler, dev); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c > index 810568bc54..11397c5c1d 100644 > --- a/drivers/net/igc/igc_ethdev.c > +++ b/drivers/net/igc/igc_ethdev.c > @@ -183,7 +183,7 @@ static void eth_igc_stop(struct rte_eth_dev *dev); > static int eth_igc_start(struct rte_eth_dev *dev); > static int eth_igc_set_link_up(struct rte_eth_dev *dev); > static int eth_igc_set_link_down(struct rte_eth_dev *dev); > -static void eth_igc_close(struct rte_eth_dev *dev); > +static int eth_igc_close(struct rte_eth_dev *dev); > static int eth_igc_reset(struct rte_eth_dev *dev); > static int eth_igc_promiscuous_enable(struct rte_eth_dev *dev); > static int eth_igc_promiscuous_disable(struct rte_eth_dev *dev); > @@ -1165,7 +1165,7 @@ igc_dev_free_queues(struct rte_eth_dev *dev) > dev->data->nb_tx_queues =3D 0; > } >=20 > -static void > +static int > eth_igc_close(struct rte_eth_dev *dev) > { > struct rte_pci_device *pci_dev =3D RTE_ETH_DEV_TO_PCI(dev); > @@ -1199,6 +1199,8 @@ eth_igc_close(struct rte_eth_dev *dev) >=20 > /* Reset any pending lock */ > igc_reset_swfw_lock(hw); > + > + return 0; > } >=20 > static void > diff --git a/drivers/net/ionic/ionic_ethdev.c > b/drivers/net/ionic/ionic_ethdev.c > index 800f6e5d64..1775fd29b7 100644 > --- a/drivers/net/ionic/ionic_ethdev.c > +++ b/drivers/net/ionic/ionic_ethdev.c > @@ -25,7 +25,7 @@ static int ionic_dev_configure(struct rte_eth_dev *dev= ); > static int ionic_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu); > static int ionic_dev_start(struct rte_eth_dev *dev); > static void ionic_dev_stop(struct rte_eth_dev *dev); > -static void ionic_dev_close(struct rte_eth_dev *dev); > +static int ionic_dev_close(struct rte_eth_dev *dev); > static int ionic_dev_set_link_up(struct rte_eth_dev *dev); > static int ionic_dev_set_link_down(struct rte_eth_dev *dev); > static int ionic_dev_link_update(struct rte_eth_dev *eth_dev, > @@ -956,7 +956,7 @@ ionic_dev_stop(struct rte_eth_dev *eth_dev) > /* > * Reset and stop device. > */ > -static void > +static int > ionic_dev_close(struct rte_eth_dev *eth_dev) > { > struct ionic_lif *lif =3D IONIC_ETH_DEV_TO_LIF(eth_dev); > @@ -967,14 +967,16 @@ ionic_dev_close(struct rte_eth_dev *eth_dev) > err =3D ionic_lif_stop(lif); > if (err) { > IONIC_PRINT(ERR, "Cannot stop LIF: %d", err); > - return; > + return -1; > } >=20 > err =3D eth_ionic_dev_uninit(eth_dev); > if (err) { > IONIC_PRINT(ERR, "Cannot destroy LIF: %d", err); > - return; > + return -1; > } > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c > b/drivers/net/ipn3ke/ipn3ke_representor.c > index b673c49149..d49abbf758 100644 > --- a/drivers/net/ipn3ke/ipn3ke_representor.c > +++ b/drivers/net/ipn3ke/ipn3ke_representor.c > @@ -208,7 +208,7 @@ ipn3ke_rpst_dev_stop(struct rte_eth_dev *dev) > } > } >=20 > -static void > +static int > ipn3ke_rpst_dev_close(struct rte_eth_dev *dev) > { > struct ipn3ke_hw *hw =3D IPN3KE_DEV_PRIVATE_TO_HW(dev); > @@ -221,6 +221,8 @@ ipn3ke_rpst_dev_close(struct rte_eth_dev *dev) > /* Disable the RX path */ > ipn3ke_xmac_rx_disable(hw, rpst->port_id, 0); > } > + > + return 0; > } >=20 > /* > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index c74467e068..5a863ca4bf 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -147,7 +147,7 @@ static int ixgbe_dev_start(struct rte_eth_dev *dev); > static void ixgbe_dev_stop(struct rte_eth_dev *dev); > static int ixgbe_dev_set_link_up(struct rte_eth_dev *dev); > static int ixgbe_dev_set_link_down(struct rte_eth_dev *dev); > -static void ixgbe_dev_close(struct rte_eth_dev *dev); > +static int ixgbe_dev_close(struct rte_eth_dev *dev); > static int ixgbe_dev_reset(struct rte_eth_dev *dev); > static int ixgbe_dev_promiscuous_enable(struct rte_eth_dev *dev); > static int ixgbe_dev_promiscuous_disable(struct rte_eth_dev *dev); > @@ -251,7 +251,7 @@ static int ixgbevf_dev_start(struct rte_eth_dev *dev= ); > static int ixgbevf_dev_link_update(struct rte_eth_dev *dev, > int wait_to_complete); > static void ixgbevf_dev_stop(struct rte_eth_dev *dev); > -static void ixgbevf_dev_close(struct rte_eth_dev *dev); > +static int ixgbevf_dev_close(struct rte_eth_dev *dev); > static int ixgbevf_dev_reset(struct rte_eth_dev *dev); > static void ixgbevf_intr_disable(struct rte_eth_dev *dev); > static void ixgbevf_intr_enable(struct rte_eth_dev *dev); > @@ -2994,7 +2994,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev > *dev) > /* > * Reset and stop device. > */ > -static void > +static int > ixgbe_dev_close(struct rte_eth_dev *dev) > { > struct ixgbe_hw *hw =3D > @@ -3065,6 +3065,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev) > rte_free(dev->security_ctx); > #endif >=20 > + return 0; > } >=20 > /* > @@ -5443,7 +5444,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev) > adapter->rss_reta_updated =3D 0; > } >=20 > -static void > +static int > ixgbevf_dev_close(struct rte_eth_dev *dev) > { > struct ixgbe_hw *hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > @@ -5472,6 +5473,8 @@ ixgbevf_dev_close(struct rte_eth_dev *dev) > rte_intr_disable(intr_handle); > rte_intr_callback_unregister(intr_handle, > ixgbevf_dev_interrupt_handler, dev); > + > + return 0; > } >=20 > /* > diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.= c > index 831fe96c96..aa365a57de 100644 > --- a/drivers/net/kni/rte_eth_kni.c > +++ b/drivers/net/kni/rte_eth_kni.c > @@ -198,7 +198,7 @@ eth_kni_dev_stop(struct rte_eth_dev *dev) > dev->data->dev_link.link_status =3D 0; > } >=20 > -static void > +static int > eth_kni_close(struct rte_eth_dev *eth_dev) > { > struct pmd_internals *internals; > @@ -214,6 +214,8 @@ eth_kni_close(struct rte_eth_dev *eth_dev) > if (ret) > PMD_LOG(WARNING, "Not able to release kni for %s", > eth_dev->data->name); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/liquidio/lio_ethdev.c > b/drivers/net/liquidio/lio_ethdev.c > index 2c2b27e62a..93e2ed5670 100644 > --- a/drivers/net/liquidio/lio_ethdev.c > +++ b/drivers/net/liquidio/lio_ethdev.c > @@ -1550,7 +1550,7 @@ lio_dev_set_link_down(struct rte_eth_dev > *eth_dev) > * @return > * - nothing > */ > -static void > +static int > lio_dev_close(struct rte_eth_dev *eth_dev) > { > struct lio_device *lio_dev =3D LIO_DEV(eth_dev); > @@ -1581,6 +1581,8 @@ lio_dev_close(struct rte_eth_dev *eth_dev) >=20 > /* Delete all queues */ > lio_dev_clear_queues(eth_dev); > + > + return 0; > } >=20 > /** > diff --git a/drivers/net/memif/rte_eth_memif.c > b/drivers/net/memif/rte_eth_memif.c > index a19c0f3e6b..1a2411c838 100644 > --- a/drivers/net/memif/rte_eth_memif.c > +++ b/drivers/net/memif/rte_eth_memif.c > @@ -1218,7 +1218,7 @@ memif_dev_start(struct rte_eth_dev *dev) > return ret; > } >=20 > -static void > +static int > memif_dev_close(struct rte_eth_dev *dev) > { > struct pmd_internals *pmd =3D dev->data->dev_private; > @@ -1239,6 +1239,8 @@ memif_dev_close(struct rte_eth_dev *dev) > } >=20 > rte_free(dev->process_private); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c > index 71061a720f..df59314b66 100644 > --- a/drivers/net/mlx4/mlx4.c > +++ b/drivers/net/mlx4/mlx4.c > @@ -370,7 +370,7 @@ mlx4_dev_stop(struct rte_eth_dev *dev) > * @param dev > * Pointer to Ethernet device structure. > */ > -static void > +static int > mlx4_dev_close(struct rte_eth_dev *dev) > { > struct mlx4_priv *priv =3D dev->data->dev_private; > @@ -400,6 +400,7 @@ mlx4_dev_close(struct rte_eth_dev *dev) > MLX4_ASSERT(priv->ctx =3D=3D NULL); > mlx4_intr_uninstall(priv); > memset(priv, 0, sizeof(*priv)); > + return 0; > } >=20 > static const struct eth_dev_ops mlx4_dev_ops =3D { > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > index 4a807fb4fd..01ead6e6af 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -1341,7 +1341,7 @@ mlx5_proc_priv_uninit(struct rte_eth_dev *dev) > * @param dev > * Pointer to Ethernet device structure. > */ > -void > +int > mlx5_dev_close(struct rte_eth_dev *dev) > { > struct mlx5_priv *priv =3D dev->data->dev_private; > @@ -1351,14 +1351,14 @@ mlx5_dev_close(struct rte_eth_dev *dev) > if (rte_eal_process_type() =3D=3D RTE_PROC_SECONDARY) { > /* Check if process_private released. */ > if (!dev->process_private) > - return; > + return 0; > mlx5_tx_uar_uninit_secondary(dev); > mlx5_proc_priv_uninit(dev); > rte_eth_dev_release_port(dev); > - return; > + return 0; > } > if (!priv->sh) > - return; > + return 0; > DRV_LOG(DEBUG, "port %u closing device \"%s\"", > dev->data->port_id, > ((priv->sh->ctx !=3D NULL) ? > @@ -1479,6 +1479,7 @@ mlx5_dev_close(struct rte_eth_dev *dev) > * it is freed when dev_private is freed. > */ > dev->data->mac_addrs =3D NULL; > + return 0; > } >=20 > /** > diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h > index 865e72d318..56f0e25b4c 100644 > --- a/drivers/net/mlx5/mlx5.h > +++ b/drivers/net/mlx5/mlx5.h > @@ -842,7 +842,7 @@ int mlx5_proc_priv_init(struct rte_eth_dev *dev); > int mlx5_udp_tunnel_port_add(struct rte_eth_dev *dev, > struct rte_eth_udp_tunnel *udp_tunnel); > uint16_t mlx5_eth_find_next(uint16_t port_id, struct rte_pci_device > *pci_dev); > -void mlx5_dev_close(struct rte_eth_dev *dev); > +int mlx5_dev_close(struct rte_eth_dev *dev); >=20 > /* Macro to iterate over all valid ports for mlx5 driver. */ > #define MLX5_ETH_FOREACH_DEV(port_id, pci_dev) \ > diff --git a/drivers/net/mvneta/mvneta_ethdev.c > b/drivers/net/mvneta/mvneta_ethdev.c > index 5bf3ebc4bd..eebcdb840e 100644 > --- a/drivers/net/mvneta/mvneta_ethdev.c > +++ b/drivers/net/mvneta/mvneta_ethdev.c > @@ -429,7 +429,7 @@ mvneta_dev_stop(struct rte_eth_dev *dev) > * @param dev > * Pointer to Ethernet device structure. > */ > -static void > +static int > mvneta_dev_close(struct rte_eth_dev *dev) > { > struct mvneta_priv *priv =3D dev->data->dev_private; > @@ -455,6 +455,8 @@ mvneta_dev_close(struct rte_eth_dev *dev) > mvneta_neta_deinit(); > rte_mvep_deinit(MVEP_MOD_T_NETA); > } > + > + return 0; > } >=20 > /** > diff --git a/drivers/net/mvpp2/mrvl_ethdev.c > b/drivers/net/mvpp2/mrvl_ethdev.c > index f5e77d07bf..27f7cfb056 100644 > --- a/drivers/net/mvpp2/mrvl_ethdev.c > +++ b/drivers/net/mvpp2/mrvl_ethdev.c > @@ -855,7 +855,7 @@ mrvl_dev_stop(struct rte_eth_dev *dev) > * @param dev > * Pointer to Ethernet device structure. > */ > -static void > +static int > mrvl_dev_close(struct rte_eth_dev *dev) > { > struct mrvl_priv *priv =3D dev->data->dev_private; > @@ -915,6 +915,8 @@ mrvl_dev_close(struct rte_eth_dev *dev) > mrvl_deinit_pp2(); > rte_mvep_deinit(MVEP_MOD_T_PP2); > } > + > + return 0; > } >=20 > /** > diff --git a/drivers/net/netvsc/hn_ethdev.c > b/drivers/net/netvsc/hn_ethdev.c > index 229c1b9149..8968036ea3 100644 > --- a/drivers/net/netvsc/hn_ethdev.c > +++ b/drivers/net/netvsc/hn_ethdev.c > @@ -841,13 +841,15 @@ hn_dev_stop(struct rte_eth_dev *dev) > hn_vf_stop(dev); > } >=20 > -static void > +static int > hn_dev_close(struct rte_eth_dev *dev) > { > PMD_INIT_FUNC_TRACE(); >=20 > hn_vf_close(dev); > hn_dev_free_queues(dev); > + > + return 0; > } >=20 > static const struct eth_dev_ops hn_eth_dev_ops =3D { > diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c > index b039ab6fc2..c3c3d003f1 100644 > --- a/drivers/net/nfb/nfb_ethdev.c > +++ b/drivers/net/nfb/nfb_ethdev.c > @@ -209,7 +209,7 @@ nfb_eth_dev_info(struct rte_eth_dev *dev, > * @param dev > * Pointer to Ethernet device structure. > */ > -static void > +static int > nfb_eth_dev_close(struct rte_eth_dev *dev) > { > struct pmd_internals *internals =3D dev->data->dev_private; > @@ -235,6 +235,8 @@ nfb_eth_dev_close(struct rte_eth_dev *dev) >=20 > rte_free(dev->data->mac_addrs); > dev->data->mac_addrs =3D NULL; > + > + return 0; > } >=20 > /** > diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c > index f5e4cd339d..9509dc8bd6 100644 > --- a/drivers/net/nfp/nfp_net.c > +++ b/drivers/net/nfp/nfp_net.c > @@ -50,7 +50,7 @@ > #include >=20 > /* Prototypes */ > -static void nfp_net_close(struct rte_eth_dev *dev); > +static int nfp_net_close(struct rte_eth_dev *dev); > static int nfp_net_configure(struct rte_eth_dev *dev); > static void nfp_net_dev_interrupt_handler(void *param); > static void nfp_net_dev_interrupt_delayed_handler(void *param); > @@ -864,7 +864,7 @@ nfp_net_set_link_down(struct rte_eth_dev *dev) > } >=20 > /* Reset and stop device. The device can not be restarted. */ > -static void > +static int > nfp_net_close(struct rte_eth_dev *dev) > { > struct nfp_net_hw *hw; > @@ -906,6 +906,8 @@ nfp_net_close(struct rte_eth_dev *dev) > * The ixgbe PMD driver disables the pcie master on the > * device. The i40e does not... > */ > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/octeontx/octeontx_ethdev.c > b/drivers/net/octeontx/octeontx_ethdev.c > index ff2e22cd44..10eeeac642 100644 > --- a/drivers/net/octeontx/octeontx_ethdev.c > +++ b/drivers/net/octeontx/octeontx_ethdev.c > @@ -478,7 +478,7 @@ octeontx_dev_configure(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > +static int > octeontx_dev_close(struct rte_eth_dev *dev) > { > struct octeontx_txq *txq =3D NULL; > @@ -517,6 +517,8 @@ octeontx_dev_close(struct rte_eth_dev *dev) >=20 > dev->tx_pkt_burst =3D NULL; > dev->rx_pkt_burst =3D NULL; > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/octeontx2/otx2_ethdev.c > b/drivers/net/octeontx2/otx2_ethdev.c > index 51a6f99877..abe5f03628 100644 > --- a/drivers/net/octeontx2/otx2_ethdev.c > +++ b/drivers/net/octeontx2/otx2_ethdev.c > @@ -2222,7 +2222,7 @@ otx2_nix_dev_start(struct rte_eth_dev *eth_dev) > } >=20 > static int otx2_nix_dev_reset(struct rte_eth_dev *eth_dev); > -static void otx2_nix_dev_close(struct rte_eth_dev *eth_dev); > +static int otx2_nix_dev_close(struct rte_eth_dev *eth_dev); >=20 > /* Initialize and register driver with DPDK Application */ > static const struct eth_dev_ops otx2_eth_dev_ops =3D { > @@ -2635,10 +2635,11 @@ otx2_eth_dev_uninit(struct rte_eth_dev > *eth_dev, bool mbox_close) > return 0; > } >=20 > -static void > +static int > otx2_nix_dev_close(struct rte_eth_dev *eth_dev) > { > otx2_eth_dev_uninit(eth_dev, true); > + return 0; > } >=20 > static int > diff --git a/drivers/net/pcap/rte_eth_pcap.c > b/drivers/net/pcap/rte_eth_pcap.c > index 668cbd1fc7..76e704a65a 100644 > --- a/drivers/net/pcap/rte_eth_pcap.c > +++ b/drivers/net/pcap/rte_eth_pcap.c > @@ -728,7 +728,7 @@ eth_stats_reset(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > +static int > eth_dev_close(struct rte_eth_dev *dev) > { > unsigned int i; > @@ -748,6 +748,7 @@ eth_dev_close(struct rte_eth_dev *dev) > } > } >=20 > + return 0; > } >=20 > static void > diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c > index 97356d2b0b..187a0019ff 100644 > --- a/drivers/net/pfe/pfe_ethdev.c > +++ b/drivers/net/pfe/pfe_ethdev.c > @@ -398,14 +398,14 @@ pfe_eth_exit(struct rte_eth_dev *dev, struct pfe > *pfe) > pfe->nb_devs--; > } >=20 > -static void > +static int > pfe_eth_close(struct rte_eth_dev *dev) > { > if (!dev) > - return; > + return -1; >=20 > if (!g_pfe) > - return; > + return -1; >=20 > pfe_eth_exit(dev, g_pfe); >=20 > @@ -415,6 +415,8 @@ pfe_eth_close(struct rte_eth_dev *dev) > rte_free(g_pfe); > g_pfe =3D NULL; > } > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/qede/qede_ethdev.c > b/drivers/net/qede/qede_ethdev.c > index 59f1746ee9..9535df183f 100644 > --- a/drivers/net/qede/qede_ethdev.c > +++ b/drivers/net/qede/qede_ethdev.c > @@ -1542,7 +1542,7 @@ static void qede_poll_sp_sb_cb(void *param) > } > } >=20 > -static void qede_dev_close(struct rte_eth_dev *eth_dev) > +static int qede_dev_close(struct rte_eth_dev *eth_dev) > { > struct rte_pci_device *pci_dev =3D RTE_ETH_DEV_TO_PCI(eth_dev); > struct qede_dev *qdev =3D QEDE_INIT_QDEV(eth_dev); > @@ -1586,6 +1586,8 @@ static void qede_dev_close(struct rte_eth_dev > *eth_dev) >=20 > if (ECORE_IS_CMT(edev)) > rte_eal_alarm_cancel(qede_poll_sp_sb_cb, (void > *)eth_dev); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c > index 1a58e0df84..eaa48627d6 100644 > --- a/drivers/net/sfc/sfc_ethdev.c > +++ b/drivers/net/sfc/sfc_ethdev.c > @@ -318,7 +318,7 @@ sfc_dev_set_link_down(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > +static int > sfc_dev_close(struct rte_eth_dev *dev) > { > struct sfc_adapter *sa =3D sfc_adapter_by_eth_dev(dev); > @@ -364,6 +364,8 @@ sfc_dev_close(struct rte_eth_dev *dev) >=20 > dev->process_private =3D NULL; > free(sa); > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/softnic/rte_eth_softnic.c > b/drivers/net/softnic/rte_eth_softnic.c > index e453fd1486..038abd98da 100644 > --- a/drivers/net/softnic/rte_eth_softnic.c > +++ b/drivers/net/softnic/rte_eth_softnic.c > @@ -201,10 +201,10 @@ pmd_dev_stop(struct rte_eth_dev *dev) > softnic_mtr_free(p); > } >=20 > -static void > +static int > pmd_dev_close(struct rte_eth_dev *dev __rte_unused) > { > - return; > + return 0; > } >=20 > static int > diff --git a/drivers/net/szedata2/rte_eth_szedata2.c > b/drivers/net/szedata2/rte_eth_szedata2.c > index a17c53577c..daa40cfd6c 100644 > --- a/drivers/net/szedata2/rte_eth_szedata2.c > +++ b/drivers/net/szedata2/rte_eth_szedata2.c > @@ -1155,7 +1155,7 @@ eth_tx_queue_release(void *q) > } > } >=20 > -static void > +static int > eth_dev_close(struct rte_eth_dev *dev) > { > struct pmd_internals *internals =3D dev->data->dev_private; > @@ -1180,6 +1180,8 @@ eth_dev_close(struct rte_eth_dev *dev) >=20 > rte_free(dev->data->mac_addrs); > dev->data->mac_addrs =3D NULL; > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.= c > index df16aa4ea7..2d1e4e365a 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -1067,7 +1067,7 @@ tap_stats_reset(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > +static int > tap_dev_close(struct rte_eth_dev *dev) > { > int i; > @@ -1116,6 +1116,8 @@ tap_dev_close(struct rte_eth_dev *dev) > * Since TUN device has no more opened file descriptors > * it will be removed from kernel > */ > + > + return 0; > } >=20 > static void > diff --git a/drivers/net/thunderx/nicvf_ethdev.c > b/drivers/net/thunderx/nicvf_ethdev.c > index 83d9488360..3d7348771a 100644 > --- a/drivers/net/thunderx/nicvf_ethdev.c > +++ b/drivers/net/thunderx/nicvf_ethdev.c > @@ -1852,7 +1852,7 @@ nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf > *nic, bool cleanup) > } > } >=20 > -static void > +static int > nicvf_dev_close(struct rte_eth_dev *dev) > { > size_t i; > @@ -1869,6 +1869,8 @@ nicvf_dev_close(struct rte_eth_dev *dev) >=20 > nicvf_periodic_alarm_stop(nicvf_vf_interrupt, nic->snicvf[i]); > } > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/vhost/rte_eth_vhost.c > b/drivers/net/vhost/rte_eth_vhost.c > index ce32be9ce3..f67f4db812 100644 > --- a/drivers/net/vhost/rte_eth_vhost.c > +++ b/drivers/net/vhost/rte_eth_vhost.c > @@ -1164,7 +1164,7 @@ eth_dev_stop(struct rte_eth_dev *dev) > update_queuing_status(dev); > } >=20 > -static void > +static int > eth_dev_close(struct rte_eth_dev *dev) > { > struct pmd_internal *internal; > @@ -1173,7 +1173,7 @@ eth_dev_close(struct rte_eth_dev *dev) >=20 > internal =3D dev->data->dev_private; > if (!internal) > - return; > + return 0; >=20 > eth_dev_stop(dev); >=20 > @@ -1201,6 +1201,8 @@ eth_dev_close(struct rte_eth_dev *dev) >=20 > rte_free(vring_states[dev->data->port_id]); > vring_states[dev->data->port_id] =3D NULL; > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/virtio/virtio_ethdev.c > b/drivers/net/virtio/virtio_ethdev.c > index 013a2904e6..0787337a01 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -704,7 +704,7 @@ virtio_alloc_queues(struct rte_eth_dev *dev) >=20 > static void virtio_queues_unbind_intr(struct rte_eth_dev *dev); >=20 > -static void > +static int > virtio_dev_close(struct rte_eth_dev *dev) > { > struct virtio_hw *hw =3D dev->data->dev_private; > @@ -713,7 +713,7 @@ virtio_dev_close(struct rte_eth_dev *dev) > PMD_INIT_LOG(DEBUG, "virtio_dev_close"); >=20 > if (!hw->opened) > - return; > + return 0; > hw->opened =3D false; >=20 > /* reset the NIC */ > @@ -743,6 +743,8 @@ virtio_dev_close(struct rte_eth_dev *dev) > if (!hw->modern) > rte_pci_ioport_unmap(VTPCI_IO(hw)); > } > + > + return 0; > } >=20 > static int > diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c > b/drivers/net/vmxnet3/vmxnet3_ethdev.c > index fa80e75a5b..17fed0ed6e 100644 > --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c > +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c > @@ -64,7 +64,7 @@ static int eth_vmxnet3_dev_uninit(struct rte_eth_dev > *eth_dev); > static int vmxnet3_dev_configure(struct rte_eth_dev *dev); > static int vmxnet3_dev_start(struct rte_eth_dev *dev); > static void vmxnet3_dev_stop(struct rte_eth_dev *dev); > -static void vmxnet3_dev_close(struct rte_eth_dev *dev); > +static int vmxnet3_dev_close(struct rte_eth_dev *dev); > static void vmxnet3_dev_set_rxmode(struct vmxnet3_hw *hw, uint32_t > feature, int set); > static int vmxnet3_dev_promiscuous_enable(struct rte_eth_dev *dev); > static int vmxnet3_dev_promiscuous_disable(struct rte_eth_dev *dev); > @@ -888,13 +888,15 @@ vmxnet3_free_queues(struct rte_eth_dev *dev) > /* > * Reset and stop device. > */ > -static void > +static int > vmxnet3_dev_close(struct rte_eth_dev *dev) > { > PMD_INIT_FUNC_TRACE(); >=20 > vmxnet3_dev_stop(dev); > vmxnet3_free_queues(dev); > + > + return 0; > } >=20 > static void > diff --git a/lib/librte_ethdev/rte_ethdev_driver.h > b/lib/librte_ethdev/rte_ethdev_driver.h > index 04ac8e923c..c3062c246c 100644 > --- a/lib/librte_ethdev/rte_ethdev_driver.h > +++ b/lib/librte_ethdev/rte_ethdev_driver.h > @@ -42,7 +42,7 @@ typedef int (*eth_dev_set_link_up_t)(struct > rte_eth_dev *dev); > typedef int (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev); > /**< @internal Function used to link down a configured Ethernet device. = */ >=20 > -typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev); > +typedef int (*eth_dev_close_t)(struct rte_eth_dev *dev); > /**< @internal Function used to close a configured Ethernet device. */ >=20 > typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev); > -- > 2.28.0