Skip to contentSkip to conversation

app/procinfo: close devices before exit

PATCH Applied Ferruh Yigit 2 participants 2 messages Sep 30, 2020 – Oct 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/procinfo: close devices before exit

As well as this is correct thing to close devices before exit, it is also useful to test the closing devices from secondary process.

---
Cc: Thomas Monjalon <[email protected]>

---
 app/proc-info/main.c | 3 +++
 1 file changed, 3 insertions(+)
app/proc-info/main.c +3 -0
index 64fb83b38d..b0de39489a 100644
@@ -1349,6 +1349,9 @@ main(int argc, char **argv)
 	if (enable_iter_mempool)
 		iter_mempool(mempool_iter_name);
 
+	RTE_ETH_FOREACH_DEV(i)
+		rte_eth_dev_close(i);
+
 	ret = rte_eal_cleanup();
 	if (ret)
 		printf("Error from rte_eal_cleanup(), %d\n", ret);
Signature · 1 line
2.26.2
#1 lore raw
Quoted 4 lines

As well as this is correct thing to close devices before exit, it is also useful to test the closing devices from secondary process.

Closing in secondary should not affect the primary. Good to test :)

Applied, thanks.