[dpdk-dev] [PATCH v2 02/25] ethdev: allow drivers to return error on close
Xu, Rosen
rosen.xu at intel.com
Mon Sep 28 02:46:31 CEST 2020
Hi,
> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Monday, September 28, 2020 7:42
> To: dev at dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit at intel.com>; arybchenko at solarflare.com; John
> W. Linville <linville at tuxdriver.com>; Loftus, Ciara <ciara.loftus at intel.com>;
> Zhang, Qi Z <qi.z.zhang at intel.com>; Shepard Siegel
> <shepard.siegel at atomicrules.com>; Ed Czeck <ed.czeck at atomicrules.com>;
> John Miller <john.miller at atomicrules.com>; Igor Russkikh
> <igor.russkikh at aquantia.com>; Pavel Belous <pavel.belous at aquantia.com>;
> Steven Webster <steven.webster at windriver.com>; Matt Peters
> <matt.peters at windriver.com>; Somalapuram Amaranath
> <asomalap at amd.com>; Rasesh Mody <rmody at marvell.com>; Shahed
> Shaikh <shshaikh at marvell.com>; Ajit Khaparde
> <ajit.khaparde at broadcom.com>; Somnath Kotur
> <somnath.kotur at broadcom.com>; Chas Williams <chas3 at att.com>; Wei Hu
> (Xavier) <xavier.huwei at huawei.com>; Rahul Lakkireddy
> <rahul.lakkireddy at chelsio.com>; Hemant Agrawal
> <hemant.agrawal at nxp.com>; Sachin Saxena <sachin.saxena at oss.nxp.com>;
> Guo, Jia <jia.guo at intel.com>; Wang, Haiyue <haiyue.wang at intel.com>;
> Marcin Wojtas <mw at semihalf.com>; Michal Krawczyk <mk at semihalf.com>;
> Guy Tzalik <gtzalik at amazon.com>; Evgeny Schemeilin
> <evgenys at amazon.com>; Igor Chauskin <igorch at amazon.com>;
> Gagandeep Singh <g.singh at nxp.com>; John Daley <johndale at cisco.com>;
> Hyong Youb Kim <hyonkim at cisco.com>; Gaetan Rivet <grive at u256.net>;
> Wang, Xiao W <xiao.w.wang at intel.com>; Ziyang Xuan
> <xuanziyang2 at huawei.com>; Xiaoyun Wang
> <cloud.wangxiaoyun at huawei.com>; Guoyang Zhou
> <zhouguoyang at huawei.com>; Min Hu (Connor) <humin29 at huawei.com>;
> Yisen Zhuang <yisen.zhuang at huawei.com>; Xing, Beilei
> <beilei.xing at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>; Yang, Qiming
> <qiming.yang at intel.com>; Alfredo Cardigliano <cardigliano at ntop.org>; Xu,
> Rosen <rosen.xu at intel.com>; Shijith Thotton <sthotton at marvell.com>;
> Srisivasubramanian Srinivasan <srinivasan at marvell.com>; Jakub Grajciar
> <jgrajcia at cisco.com>; Matan Azrad <matan at nvidia.com>; Shahaf Shuler
> <shahafs at nvidia.com>; Viacheslav Ovsiienko <viacheslavo at nvidia.com>;
> Zyta Szpak <zr at semihalf.com>; Liron Himi <lironh at marvell.com>; Stephen
> Hemminger <sthemmin at microsoft.com>; K. Y. Srinivasan
> <kys at microsoft.com>; Haiyang Zhang <haiyangz at microsoft.com>; Long Li
> <longli at microsoft.com>; Martin Spinler <spinler at cesnet.cz>; Heinrich Kuhn
> <heinrich.kuhn at netronome.com>; Harman Kalra <hkalra at marvell.com>;
> Jerin Jacob <jerinj at marvell.com>; Nithin Dabilpuram
> <ndabilpuram at marvell.com>; Kiran Kumar K <kirankumark at marvell.com>;
> Akhil Goyal <akhil.goyal at nxp.com>; Singh, Jasvinder
> <jasvinder.singh at intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu at intel.com>; Wiles, Keith <keith.wiles at intel.com>;
> Maciej Czekaj <mczekaj at marvell.com>; Maxime Coquelin
> <maxime.coquelin at redhat.com>; Xia, Chenbo <chenbo.xia at intel.com>;
> Wang, Zhihong <zhihong.wang at intel.com>; Yong Wang
> <yongwang at vmware.com>
> Subject: [PATCH v2 02/25] ethdev: allow drivers to return error on close
>
> The device operation .dev_close was returning void.
> This driver interface is changed to return an int.
>
> Note that the API rte_eth_dev_close() is still returning void,
> although a deprecation notice is pending to change it as well.
>
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> ---
> 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(-)
>
> 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)
> }
> }
>
> -static void
> +static int
> ipn3ke_rpst_dev_close(struct rte_eth_dev *dev)
> {
> struct ipn3ke_hw *hw = 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;
> }
>
> /*
> 2.28.0
For net/ipn3ke
Reviewed-by: Rosen Xu <rosen.xu at intel.com>
More information about the dev
mailing list