[PATCH] app/test-eventdev: wait for workers before cryptodev destroy

Pavan Nikhilesh Bhagavatula pbhagavatula at marvell.com
Mon Jun 13 08:38:38 CEST 2022



> -----Original Message-----
> From: Shijith Thotton <sthotton at marvell.com>
> Sent: Thursday, June 2, 2022 5:15 PM
> To: Jerin Jacob Kollanukkaran <jerinj at marvell.com>
> Cc: Shijith Thotton <sthotton at marvell.com>; dev at dpdk.org; Pavan
> Nikhilesh Bhagavatula <pbhagavatula at marvell.com>
> Subject: [PATCH] app/test-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")
> 
> Signed-off-by: Shijith Thotton <sthotton at marvell.com>

Acked-by: Pavan Nikhilesh <pbhagavatula at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 15289 bytes
Desc: not available
URL: <http://mails.dpdk.org/archives/dev/attachments/20220613/feafcdc7/attachment-0001.bin>


More information about the dev mailing list