[dpdk-stable] [DPDK] net/i40e: fix update PMD close function
chenxux.di at intel.com
chenxux.di at intel.com
Wed Jul 31 11:22:19 CEST 2019
From: "Di, ChenxuX" <chenxux.di at intel.com>
For each driver where we add flag RTE_ETH_DEV_CLOSE_REMOVE to
eth_xxx_dev_init() to pass the information to the rte_eth_dev_close()
that it should also release the private port resources.
Fixes: 23ea57a2a0ce ("ethdev: complete closing of port")
Cc: stable at dpdk.org
Signed-off-by: Di ChenxuX <chenxux.di at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4e40b7ab5..def78047a 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1520,6 +1520,12 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
&dev->data->mac_addrs[0]);
+ /*
+ * Pass the information to the rte_eth_dev_close() that it should also
+ * release the private port resources.
+ */
+ dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
+
/* Init dcb to sw mode by default */
ret = i40e_dcb_init_configure(dev, TRUE);
if (ret != I40E_SUCCESS) {
--
2.17.1
More information about the stable
mailing list