DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] test/crypto: close PMD after tests
@ 2021-03-01 12:21 Adam Dybkowski
  2021-03-01 12:21 ` [dpdk-dev] [PATCH 2/2] app/crypto-perf: close PMD after benchmark run Adam Dybkowski
  2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Adam Dybkowski
  0 siblings, 2 replies; 15+ 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] 15+ messages in thread

* [dpdk-dev] [PATCH 2/2] app/crypto-perf: close PMD after benchmark run
  2021-03-01 12:21 [dpdk-dev] [PATCH 1/2] test/crypto: close PMD after tests Adam Dybkowski
@ 2021-03-01 12:21 ` Adam Dybkowski
  2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Adam Dybkowski
  1 sibling, 0 replies; 15+ 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 benchmark.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test-crypto-perf/main.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 49af812d8..c1d338fa4 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -738,8 +738,10 @@ main(int argc, char **argv)
 	}
 
 	for (i = 0; i < nb_cryptodevs &&
-			i < RTE_CRYPTO_MAX_DEVS; i++)
+			i < RTE_CRYPTO_MAX_DEVS; i++) {
 		rte_cryptodev_stop(enabled_cdevs[i]);
+		rte_cryptodev_close(enabled_cdevs[i]);
+	}
 
 	free_test_vector(t_vec, &opts);
 
@@ -758,8 +760,10 @@ main(int argc, char **argv)
 	}
 
 	for (i = 0; i < nb_cryptodevs &&
-			i < RTE_CRYPTO_MAX_DEVS; i++)
+			i < RTE_CRYPTO_MAX_DEVS; i++) {
 		rte_cryptodev_stop(enabled_cdevs[i]);
+		rte_cryptodev_close(enabled_cdevs[i]);
+	}
 	rte_free(opts.imix_buffer_sizes);
 	free_test_vector(t_vec, &opts);
 
-- 
2.25.1


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

* [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests
  2021-03-01 12:21 [dpdk-dev] [PATCH 1/2] test/crypto: close PMD after tests Adam Dybkowski
  2021-03-01 12:21 ` [dpdk-dev] [PATCH 2/2] app/crypto-perf: close PMD after benchmark run Adam Dybkowski
@ 2021-03-08 12:57 ` Adam Dybkowski
  2021-03-08 12:57   ` [dpdk-dev] [PATCH v2 1/2] " Adam Dybkowski
                     ` (3 more replies)
  1 sibling, 4 replies; 15+ messages in thread
From: Adam Dybkowski @ 2021-03-08 12:57 UTC (permalink / raw)
  To: dev, declan.doherty, arkadiuszx.kusztal; +Cc: Adam Dybkowski

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

--
v2:
* display error message on close error


Adam Dybkowski (2):
  test/crypto: close PMD after tests
  app/crypto-perf: close PMD after benchmark run

 app/test-crypto-perf/main.c | 15 +++++++++++++--
 app/test/test_cryptodev.c   |  6 +++++-
 2 files changed, 18 insertions(+), 3 deletions(-)

-- 
2.25.1


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

* [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
  2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Adam Dybkowski
@ 2021-03-08 12:57   ` Adam Dybkowski
  2021-03-08 12:57   ` [dpdk-dev] [PATCH v2 2/2] app/crypto-perf: close PMD after benchmark run Adam Dybkowski
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Adam Dybkowski @ 2021-03-08 12:57 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 | 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);
 }
 
 static int
-- 
2.25.1


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

* [dpdk-dev] [PATCH v2 2/2] app/crypto-perf: close PMD after benchmark run
  2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Adam Dybkowski
  2021-03-08 12:57   ` [dpdk-dev] [PATCH v2 1/2] " Adam Dybkowski
@ 2021-03-08 12:57   ` Adam Dybkowski
  2021-03-08 13:45   ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Kusztal, ArkadiuszX
  2021-04-09 12:12   ` [dpdk-dev] [PATCH v3 " Adam Dybkowski
  3 siblings, 0 replies; 15+ messages in thread
From: Adam Dybkowski @ 2021-03-08 12:57 UTC (permalink / raw)
  To: dev, declan.doherty, arkadiuszx.kusztal; +Cc: Adam Dybkowski

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

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test-crypto-perf/main.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 49af812d8..70cb04a21 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -738,8 +738,13 @@ main(int argc, char **argv)
 	}
 
 	for (i = 0; i < nb_cryptodevs &&
-			i < RTE_CRYPTO_MAX_DEVS; i++)
+			i < RTE_CRYPTO_MAX_DEVS; i++) {
 		rte_cryptodev_stop(enabled_cdevs[i]);
+		ret = rte_cryptodev_close(enabled_cdevs[i]);
+		if (ret)
+			RTE_LOG(ERR, USER1,
+					"Crypto device close error %d\n", ret);
+	}
 
 	free_test_vector(t_vec, &opts);
 
@@ -758,8 +763,14 @@ main(int argc, char **argv)
 	}
 
 	for (i = 0; i < nb_cryptodevs &&
-			i < RTE_CRYPTO_MAX_DEVS; i++)
+			i < RTE_CRYPTO_MAX_DEVS; i++) {
 		rte_cryptodev_stop(enabled_cdevs[i]);
+		ret = rte_cryptodev_close(enabled_cdevs[i]);
+		if (ret)
+			RTE_LOG(ERR, USER1,
+					"Crypto device close error %d\n", ret);
+
+	}
 	rte_free(opts.imix_buffer_sizes);
 	free_test_vector(t_vec, &opts);
 
-- 
2.25.1


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

* Re: [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests
  2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Adam Dybkowski
  2021-03-08 12:57   ` [dpdk-dev] [PATCH v2 1/2] " Adam Dybkowski
  2021-03-08 12:57   ` [dpdk-dev] [PATCH v2 2/2] app/crypto-perf: close PMD after benchmark run Adam Dybkowski
@ 2021-03-08 13:45   ` Kusztal, ArkadiuszX
  2021-04-09 12:12   ` [dpdk-dev] [PATCH v3 " Adam Dybkowski
  3 siblings, 0 replies; 15+ messages in thread
From: Kusztal, ArkadiuszX @ 2021-03-08 13:45 UTC (permalink / raw)
  To: Dybkowski, AdamX, dev, Doherty, Declan



> -----Original Message-----
> From: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> Sent: Monday, March 8, 2021 1:57 PM
> To: dev@dpdk.org; Doherty, Declan <declan.doherty@intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Cc: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> Subject: [PATCH v2 0/2] test/crypto: close PMD after tests
> 
> This patch adds closing of the PMD after running the tests.
> 
> --
> v2:
> * display error message on close error
> 
> 
> Adam Dybkowski (2):
>   test/crypto: close PMD after tests
>   app/crypto-perf: close PMD after benchmark run
> 
>  app/test-crypto-perf/main.c | 15 +++++++++++++--
>  app/test/test_cryptodev.c   |  6 +++++-
>  2 files changed, 18 insertions(+), 3 deletions(-)
> 
> --
> 2.25.1
Series Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>

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

* [dpdk-dev] [PATCH v3 0/2] test/crypto: close PMD after tests
  2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Adam Dybkowski
                     ` (2 preceding siblings ...)
  2021-03-08 13:45   ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Kusztal, ArkadiuszX
@ 2021-04-09 12:12   ` Adam Dybkowski
  2021-04-09 12:13     ` [dpdk-dev] [PATCH v3 1/2] " Adam Dybkowski
                       ` (2 more replies)
  3 siblings, 3 replies; 15+ messages in thread
From: Adam Dybkowski @ 2021-04-09 12:12 UTC (permalink / raw)
  To: dev, declan.doherty, arkadiuszx.kusztal, gakhil; +Cc: Adam Dybkowski

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

--
v3:
* move the call from ut_teardown to testsuite_teardown
v2:
* display error message on close error


Adam Dybkowski (2):
  test/crypto: close PMD after tests
  app/crypto-perf: close PMD after benchmark run

 app/test-crypto-perf/main.c | 15 +++++++++++++--
 app/test/test_cryptodev.c   |  5 +++++
 2 files changed, 18 insertions(+), 2 deletions(-)

-- 
2.25.1


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

* [dpdk-dev] [PATCH v3 1/2] test/crypto: close PMD after tests
  2021-04-09 12:12   ` [dpdk-dev] [PATCH v3 " Adam Dybkowski
@ 2021-04-09 12:13     ` Adam Dybkowski
  2021-04-09 12:13     ` [dpdk-dev] [PATCH v3 2/2] app/crypto-perf: close PMD after benchmark run Adam Dybkowski
  2021-04-13 13:33     ` [dpdk-dev] [EXT] [PATCH v3 0/2] test/crypto: close PMD after tests Akhil Goyal
  2 siblings, 0 replies; 15+ messages in thread
From: Adam Dybkowski @ 2021-04-09 12:13 UTC (permalink / raw)
  To: dev, declan.doherty, arkadiuszx.kusztal, gakhil; +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 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index f91debc168..d68855c442 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -842,6 +842,7 @@ static void
 testsuite_teardown(void)
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
+	int res;
 
 	if (ts_params->mbuf_pool != NULL) {
 		RTE_LOG(DEBUG, USER1, "CRYPTO_MBUFPOOL count %u\n",
@@ -863,6 +864,10 @@ testsuite_teardown(void)
 		rte_mempool_free(ts_params->session_mpool);
 		ts_params->session_mpool = NULL;
 	}
+
+	res = rte_cryptodev_close(ts_params->valid_devs[0]);
+	if (res)
+		RTE_LOG(ERR, USER1, "Crypto device close error %d\n", res);
 }
 
 static int
-- 
2.25.1


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

* [dpdk-dev] [PATCH v3 2/2] app/crypto-perf: close PMD after benchmark run
  2021-04-09 12:12   ` [dpdk-dev] [PATCH v3 " Adam Dybkowski
  2021-04-09 12:13     ` [dpdk-dev] [PATCH v3 1/2] " Adam Dybkowski
@ 2021-04-09 12:13     ` Adam Dybkowski
  2021-04-13 13:33     ` [dpdk-dev] [EXT] [PATCH v3 0/2] test/crypto: close PMD after tests Akhil Goyal
  2 siblings, 0 replies; 15+ messages in thread
From: Adam Dybkowski @ 2021-04-09 12:13 UTC (permalink / raw)
  To: dev, declan.doherty, arkadiuszx.kusztal, gakhil; +Cc: Adam Dybkowski

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

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test-crypto-perf/main.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 49af812d8b..70cb04a214 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -738,8 +738,13 @@ main(int argc, char **argv)
 	}
 
 	for (i = 0; i < nb_cryptodevs &&
-			i < RTE_CRYPTO_MAX_DEVS; i++)
+			i < RTE_CRYPTO_MAX_DEVS; i++) {
 		rte_cryptodev_stop(enabled_cdevs[i]);
+		ret = rte_cryptodev_close(enabled_cdevs[i]);
+		if (ret)
+			RTE_LOG(ERR, USER1,
+					"Crypto device close error %d\n", ret);
+	}
 
 	free_test_vector(t_vec, &opts);
 
@@ -758,8 +763,14 @@ main(int argc, char **argv)
 	}
 
 	for (i = 0; i < nb_cryptodevs &&
-			i < RTE_CRYPTO_MAX_DEVS; i++)
+			i < RTE_CRYPTO_MAX_DEVS; i++) {
 		rte_cryptodev_stop(enabled_cdevs[i]);
+		ret = rte_cryptodev_close(enabled_cdevs[i]);
+		if (ret)
+			RTE_LOG(ERR, USER1,
+					"Crypto device close error %d\n", ret);
+
+	}
 	rte_free(opts.imix_buffer_sizes);
 	free_test_vector(t_vec, &opts);
 
-- 
2.25.1


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

* Re: [dpdk-dev] [EXT] [PATCH v3 0/2] test/crypto: close PMD after tests
  2021-04-09 12:12   ` [dpdk-dev] [PATCH v3 " Adam Dybkowski
  2021-04-09 12:13     ` [dpdk-dev] [PATCH v3 1/2] " Adam Dybkowski
  2021-04-09 12:13     ` [dpdk-dev] [PATCH v3 2/2] app/crypto-perf: close PMD after benchmark run Adam Dybkowski
@ 2021-04-13 13:33     ` Akhil Goyal
  2 siblings, 0 replies; 15+ messages in thread
From: Akhil Goyal @ 2021-04-13 13:33 UTC (permalink / raw)
  To: Adam Dybkowski, dev, declan.doherty, arkadiuszx.kusztal

> This patch adds closing of the PMD after running the tests.
> 
> --
> v3:
> * move the call from ut_teardown to testsuite_teardown
Series Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-crypto

Thanks.

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

* Re: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
  2021-04-08 12:15     ` Akhil Goyal
@ 2021-04-09  8:56       ` Dybkowski, AdamX
  0 siblings, 0 replies; 15+ messages in thread
From: Dybkowski, AdamX @ 2021-04-09  8:56 UTC (permalink / raw)
  To: Akhil Goyal, dev, Doherty, Declan, Kusztal, ArkadiuszX

Thanks for spotting this.
I'll move the call to rte_cryptodev_close into the function testsuite_teardown and send v3.

Adam

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, 8 April, 2021 14:16
> To: Dybkowski, AdamX <adamx.dybkowski@intel.com>; dev@dpdk.org;
> Doherty, Declan <declan.doherty@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
> 
> > The pmd is initialized in the setup function.
> > This patch adds one extra step inside the teardown function: the call
> > to the rte_cryptodev_close apart of the call to rte_cryptodev_stop
> > function that existed before.
> >
> > I don't see any sense of calling the stop function inside the setup,
> > in my opinion it's much better to do it during the teardown.
> >
> 
> Sorry, I wanted to refer to testsuite_teardown() instead of ut_teardown().
> The reason is that, vdevs are initialized in testsuite_setup and not ut_setup.
> Hence corresponding reverse function should be in testsuite_teardown().
> 
> -akhil
> >
> > > -----Original Message-----
> > > From: Akhil Goyal <gakhil@marvell.com>
> > > Sent: Monday, 5 April, 2021 20:59
> > > To: Akhil Goyal <gakhil@marvell.com>; Dybkowski, AdamX
> > > <adamx.dybkowski@intel.com>; dev@dpdk.org; Doherty, Declan
> > > <declan.doherty@intel.com>; Kusztal, ArkadiuszX
> > > <arkadiuszx.kusztal@intel.com>
> > > Subject: RE: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after
> > > tests
> > >
> > > Hi Adam/Arek,
> > >
> > > Could you please reply to the below query.
> > >
> > > > > 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] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
  2021-04-06  9:15   ` Dybkowski, AdamX
@ 2021-04-08 12:15     ` Akhil Goyal
  2021-04-09  8:56       ` Dybkowski, AdamX
  0 siblings, 1 reply; 15+ messages in thread
From: Akhil Goyal @ 2021-04-08 12:15 UTC (permalink / raw)
  To: Dybkowski, AdamX, dev, Doherty, Declan, Kusztal, ArkadiuszX

> The pmd is initialized in the setup function.
> This patch adds one extra step inside the teardown function: the call to the
> rte_cryptodev_close apart of the call to rte_cryptodev_stop function that
> existed before.
> 
> I don't see any sense of calling the stop function inside the setup, in my
> opinion it's much better to do it during the teardown.
> 

Sorry, I wanted to refer to testsuite_teardown() instead of ut_teardown().
The reason is that, vdevs are initialized in testsuite_setup and not ut_setup.
Hence corresponding reverse function should be in testsuite_teardown().

-akhil
> 
> > -----Original Message-----
> > From: Akhil Goyal <gakhil@marvell.com>
> > Sent: Monday, 5 April, 2021 20:59
> > To: Akhil Goyal <gakhil@marvell.com>; Dybkowski, AdamX
> > <adamx.dybkowski@intel.com>; dev@dpdk.org; Doherty, Declan
> > <declan.doherty@intel.com>; Kusztal, ArkadiuszX
> > <arkadiuszx.kusztal@intel.com>
> > Subject: RE: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
> >
> > Hi Adam/Arek,
> >
> > Could you please reply to the below query.
> >
> > > > 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] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
  2021-04-05 18:58 ` Akhil Goyal
@ 2021-04-06  9:15   ` Dybkowski, AdamX
  2021-04-08 12:15     ` Akhil Goyal
  0 siblings, 1 reply; 15+ messages in thread
From: Dybkowski, AdamX @ 2021-04-06  9:15 UTC (permalink / raw)
  To: Akhil Goyal, dev, Doherty, Declan, Kusztal, ArkadiuszX

The pmd is initialized in the setup function.
This patch adds one extra step inside the teardown function: the call to the rte_cryptodev_close apart of the call to rte_cryptodev_stop function that existed before.

I don't see any sense of calling the stop function inside the setup, in my opinion it's much better to do it during the teardown.

Adam

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Monday, 5 April, 2021 20:59
> To: Akhil Goyal <gakhil@marvell.com>; Dybkowski, AdamX
> <adamx.dybkowski@intel.com>; dev@dpdk.org; Doherty, Declan
> <declan.doherty@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
> 
> Hi Adam/Arek,
> 
> Could you please reply to the below query.
> 
> > > 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] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
  2021-03-23 19:27 [dpdk-dev] [PATCH v2 1/2] " Akhil Goyal
@ 2021-04-05 18:58 ` Akhil Goyal
  2021-04-06  9:15   ` Dybkowski, AdamX
  0 siblings, 1 reply; 15+ messages in thread
From: Akhil Goyal @ 2021-04-05 18:58 UTC (permalink / raw)
  To: Akhil Goyal, Adam Dybkowski, dev, declan.doherty, arkadiuszx.kusztal

Hi Adam/Arek,

Could you please reply to the below query.

> > 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] 15+ messages in thread

* 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; 15+ 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] 15+ messages in thread

end of thread, other threads:[~2021-04-13 13:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 12:21 [dpdk-dev] [PATCH 1/2] test/crypto: close PMD after tests Adam Dybkowski
2021-03-01 12:21 ` [dpdk-dev] [PATCH 2/2] app/crypto-perf: close PMD after benchmark run Adam Dybkowski
2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Adam Dybkowski
2021-03-08 12:57   ` [dpdk-dev] [PATCH v2 1/2] " Adam Dybkowski
2021-03-08 12:57   ` [dpdk-dev] [PATCH v2 2/2] app/crypto-perf: close PMD after benchmark run Adam Dybkowski
2021-03-08 13:45   ` [dpdk-dev] [PATCH v2 0/2] test/crypto: close PMD after tests Kusztal, ArkadiuszX
2021-04-09 12:12   ` [dpdk-dev] [PATCH v3 " Adam Dybkowski
2021-04-09 12:13     ` [dpdk-dev] [PATCH v3 1/2] " Adam Dybkowski
2021-04-09 12:13     ` [dpdk-dev] [PATCH v3 2/2] app/crypto-perf: close PMD after benchmark run Adam Dybkowski
2021-04-13 13:33     ` [dpdk-dev] [EXT] [PATCH v3 0/2] test/crypto: close PMD after tests Akhil Goyal
2021-03-23 19:27 [dpdk-dev] [PATCH v2 1/2] " 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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git