[dpdk-dev] [PATCH 09/10] net/bnxt: release port upon close
Kalesh A P
kalesh-anakkur.purayil at broadcom.com
Mon Jan 13 05:36:08 CET 2020
From: Somnath Kotur <somnath.kotur at broadcom.com>
Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources
for the port can be freed by rte_eth_dev_close().
Signed-off-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Kalesh Anakkur Purayil <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde at broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ba3f0a7..8acfade 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4856,6 +4856,11 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
if (rc)
goto error_free;
+ /* Pass the information to the rte_eth_dev_close() that it should also
+ * release the private port resources.
+ */
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
+
PMD_DRV_LOG(INFO,
DRV_MODULE_NAME "found at mem %" PRIX64 ", node addr %pM\n",
pci_dev->mem_resource[0].phys_addr,
--
2.10.1
More information about the dev
mailing list