DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] app/test-eventdev: wait for workers before cryptodev destroy
@ 2022-06-02 11:45 Shijith Thotton
  2022-06-13  6:38 ` Pavan Nikhilesh Bhagavatula
  0 siblings, 1 reply; 3+ messages in thread
From: Shijith Thotton @ 2022-06-02 11:45 UTC (permalink / raw)
  To: jerinj; +Cc: Shijith Thotton, dev, pbhagavatula

Destroying cryptodev resources before exiting workers are not safe.
Moved cryptodev destroy after worker thread exit in main thread.

Fixes: de2bc16e1bd1 ("app/eventdev: add crypto producer mode")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 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 c5d63061bf..b785e603ee 100644
--- a/app/test-eventdev/evt_main.c
+++ b/app/test-eventdev/evt_main.c
@@ -159,9 +159,6 @@ main(int argc, char **argv)
 	if (test->ops.ethdev_rx_stop)
 		test->ops.ethdev_rx_stop(test, &opt);
 
-	if (test->ops.cryptodev_destroy)
-		test->ops.cryptodev_destroy(test, &opt);
-
 	rte_eal_mp_wait_lcore();
 
 	if (test->ops.test_result)
@@ -173,6 +170,9 @@ main(int argc, char **argv)
 	if (test->ops.eventdev_destroy)
 		test->ops.eventdev_destroy(test, &opt);
 
+	if (test->ops.cryptodev_destroy)
+		test->ops.cryptodev_destroy(test, &opt);
+
 	if (test->ops.mempool_destroy)
 		test->ops.mempool_destroy(test, &opt);
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-13  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 11:45 [PATCH] app/test-eventdev: wait for workers before cryptodev destroy Shijith Thotton
2022-06-13  6:38 ` Pavan Nikhilesh Bhagavatula
2022-06-13  6:59   ` Jerin Jacob

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).