[dpdk-dev] [PATCH v2] app/eventdev: use proper teardown sequence

Pavan Nikhilesh pbhagavatula at caviumnetworks.com
Thu Jul 19 13:41:20 CEST 2018


Use proper teardown sequence when SIGINT is caught to prevent
eventdev from going into undefined state.

Signed-off-by: Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
---
 v2 Changes:
 - Only stopping the ethdev(producer) is sufficient.(Jerin)

 app/test-eventdev/evt_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c
index 57bb94570..18941f0ca 100644
--- a/app/test-eventdev/evt_main.c
+++ b/app/test-eventdev/evt_main.c
@@ -27,6 +27,9 @@ signal_handler(int signum)
 		*(int *)test->test_priv = true;
 		rte_wmb();

+		if (test->ops.ethdev_destroy)
+			test->ops.ethdev_destroy(test, &opt);
+
 		rte_eal_mp_wait_lcore();

 		if (test->ops.test_result)
@@ -35,9 +38,6 @@ signal_handler(int signum)
 		if (test->ops.eventdev_destroy)
 			test->ops.eventdev_destroy(test, &opt);

-		if (test->ops.ethdev_destroy)
-			test->ops.ethdev_destroy(test, &opt);
-
 		if (test->ops.mempool_destroy)
 			test->ops.mempool_destroy(test, &opt);

--
2.18.0



More information about the dev mailing list