]> git.droids-corp.org - dpdk.git/commitdiff
app/eventdev: wait for workers before cryptodev destroy
authorShijith Thotton <sthotton@marvell.com>
Thu, 2 Jun 2022 11:45:28 +0000 (17:15 +0530)
committerJerin Jacob <jerinj@marvell.com>
Mon, 13 Jun 2022 06:56:19 +0000 (08:56 +0200)
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 <sthotton@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
app/test-eventdev/evt_main.c

index c5d63061bf3f51ab1366a9b34dd258c194606754..b785e603ee767cf927bfa066826f83d10c768f05 100644 (file)
@@ -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);