From: Shijith Thotton Date: Thu, 2 Jun 2022 11:45:28 +0000 (+0530) Subject: app/eventdev: wait for workers before cryptodev destroy X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=67f227079854da73f1f6efc0b9b4e756510e687b;p=dpdk.git app/eventdev: wait for workers before cryptodev destroy 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") Cc: stable@dpdk.org Signed-off-by: Shijith Thotton Acked-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- 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);