app/procinfo: close devices before exit
diff mbox series

Message ID 20200930120637.2350208-1-ferruh.yigit@intel.com
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series
  • app/procinfo: close devices before exit
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/checkpatch success coding style OK

Commit Message

Ferruh Yigit Sept. 30, 2020, 12:06 p.m. UTC
As well as this is correct thing to close devices before exit, it is
also useful to test the closing devices from secondary process.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Thomas Monjalon <thomas@monjalon.net>
---
 app/proc-info/main.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Thomas Monjalon Oct. 6, 2020, 8:02 p.m. UTC | #1
> As well as this is correct thing to close devices before exit, it is
> also useful to test the closing devices from secondary process.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

Applied, thanks.

Patch
diff mbox series

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 64fb83b38d..b0de39489a 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -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);