* [dpdk-stable] [DPDK] net/i40e: fix update PMD close function
@ 2019-07-31 9:22 chenxux.di
0 siblings, 0 replies; only message in thread
From: chenxux.di @ 2019-07-31 9:22 UTC (permalink / raw)
To: qabuild; +Cc: Di, ChenxuX, stable
From: "Di, ChenxuX" <chenxux.di@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@dpdk.org
Signed-off-by: Di ChenxuX <chenxux.di@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-31 9:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 9:22 [dpdk-stable] [DPDK] net/i40e: fix update PMD close function chenxux.di
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).