DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
@ 2021-03-23 19:27 Akhil Goyal
  2021-04-05 18:58 ` Akhil Goyal
  0 siblings, 1 reply; 6+ messages in thread
From: Akhil Goyal @ 2021-03-23 19:27 UTC (permalink / raw)
  To: Adam Dybkowski, dev, declan.doherty, arkadiuszx.kusztal

> This patch adds closing of the PMD after running the tests.
> 
> Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> ---
>  app/test/test_cryptodev.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
> index f91debc16..ea965a64a 100644
> --- a/app/test/test_cryptodev.c
> +++ b/app/test/test_cryptodev.c
> @@ -928,6 +928,7 @@ ut_teardown(void)
>  	struct crypto_testsuite_params *ts_params = &testsuite_params;
>  	struct crypto_unittest_params *ut_params = &unittest_params;
>  	struct rte_cryptodev_stats stats;
> +	int res;
> 
>  	/* free crypto session structure */
>  #ifdef RTE_LIB_SECURITY
> @@ -976,8 +977,11 @@ ut_teardown(void)
> 
>  	rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
> 
> -	/* Stop the device */
> +	/* Stop and close the device */
>  	rte_cryptodev_stop(ts_params->valid_devs[0]);
> +	res = rte_cryptodev_close(ts_params->valid_devs[0]);
> +	if (res)
> +		RTE_LOG(ERR, USER1, "Crypto device close error %d\n", res);

Shouldn't this be part of testsuite_setup() instead of ut_teardown()?
In cases of vdev, devices are initialized as part of testsuite_setup().

Should we also call rte_cryptodev_queue_pair_release from ut_teardown?

Regards,
Akhil

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 1/2] test/crypto: close PMD after tests
@ 2021-03-01 12:21 Adam Dybkowski
  2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] " Adam Dybkowski
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Dybkowski @ 2021-03-01 12:21 UTC (permalink / raw)
  To: dev, declan.doherty, arkadiuszx.kusztal; +Cc: Adam Dybkowski

This patch adds closing of the PMD after running the tests.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test/test_cryptodev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index f91debc16..7dcd255de 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -976,8 +976,9 @@ ut_teardown(void)
 
 	rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
 
-	/* Stop the device */
+	/* Stop and close the device */
 	rte_cryptodev_stop(ts_params->valid_devs[0]);
+	rte_cryptodev_close(ts_params->valid_devs[0]);
 }
 
 static int
-- 
2.25.1


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

end of thread, other threads:[~2021-04-09  8:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 19:27 [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests Akhil Goyal
2021-04-05 18:58 ` Akhil Goyal
2021-04-06  9:15   ` Dybkowski, AdamX
2021-04-08 12:15     ` Akhil Goyal
2021-04-09  8:56       ` Dybkowski, AdamX
  -- strict thread matches above, loose matches on Subject: below --
2021-03-01 12:21 [dpdk-dev] [PATCH " Adam Dybkowski
2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] " Adam Dybkowski
2021-03-08 12:57   ` [dpdk-dev] [PATCH v2 1/2] " Adam Dybkowski

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