ethdev: reset all when releasing a port
authorThomas Monjalon <thomas@monjalon.net>
Fri, 16 Oct 2020 13:32:58 +0000 (15:32 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 20:26:41 +0000 (22:26 +0200)
commit0607dadf98c71bdc96ea7b54eda26f1b667be1f6
tree15ec36706b43399c2823a543e6d2e80f902cdf16
parentb8f5d2ae75c97698190d46f4810d01f407016aad
ethdev: reset all when releasing a port

The function rte_eth_dev_release_port() is partially resetting
the struct rte_eth_dev. The drivers were completing this reset
with more pointers set to NULL in the close or remove operations.

More pointers are reset at ethdev level,
and some redundant assignments are removed from PMDs.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
31 files changed:
drivers/net/ark/ark_ethdev.c
drivers/net/atlantic/atl_ethdev.c
drivers/net/axgbe/axgbe_ethdev.c
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_reps.c
drivers/net/bonding/rte_eth_bond_pmd.c
drivers/net/dpaa/dpaa_ethdev.c
drivers/net/dpaa2/dpaa2_ethdev.c
drivers/net/e1000/em_ethdev.c
drivers/net/e1000/igb_ethdev.c
drivers/net/ena/ena_ethdev.c
drivers/net/fm10k/fm10k_ethdev.c
drivers/net/hinic/hinic_pmd_ethdev.c
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev_vf.c
drivers/net/i40e/i40e_ethdev.c
drivers/net/i40e/i40e_ethdev_vf.c
drivers/net/iavf/iavf_ethdev.c
drivers/net/ice/ice_dcf_ethdev.c
drivers/net/ice/ice_ethdev.c
drivers/net/ionic/ionic_ethdev.c
drivers/net/ixgbe/ixgbe_ethdev.c
drivers/net/liquidio/lio_ethdev.c
drivers/net/netvsc/hn_ethdev.c
drivers/net/octeontx/octeontx_ethdev.c
drivers/net/qede/qede_ethdev.c
drivers/net/sfc/sfc_ethdev.c
drivers/net/tap/rte_eth_tap.c
drivers/net/virtio/virtio_ethdev.c
drivers/net/vmxnet3/vmxnet3_ethdev.c
lib/librte_ethdev/rte_ethdev.c