test/crypto: close PMD after tests
PATCH v2 1/2 test/crypto: close PMD after tests
This patch adds closing of the PMD after running the tests.
--- app/test/test_cryptodev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
app/test/test_cryptodev.c +2 -1
@@ -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
Signature · 1 line
2.25.1
PATCH v2 2/2 app/crypto-perf: close PMD after benchmark run
This patch adds closing of the PMD after running the benchmark.
--- app/test-crypto-perf/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
app/test-crypto-perf/main.c +6 -2
@@ -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);
Signature · 1 line
2.25.1
v2 cover test/crypto: close PMD after tests
In reply to Adam DybkowskiThis 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(-)
Signature · 1 line
2.25.1
PATCH v2 1/2 test/crypto: close PMD after tests
This patch adds closing of the PMD after running the tests.
--- app/test/test_cryptodev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
app/test/test_cryptodev.c +5 -1
@@ -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
Signature · 1 line
2.25.1
PATCH v2 2/2 app/crypto-perf: close PMD after benchmark run
In reply to Adam DybkowskiThis patch adds closing of the PMD after running the benchmark.
--- app/test-crypto-perf/main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
app/test-crypto-perf/main.c +13 -2
@@ -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);
Signature · 1 line
2.25.1
Quoted 21 lines
-----Original Message-----
From: Dybkowski, AdamX <[email protected]>
Sent: Monday, March 8, 2021 1:57 PM
To: [email protected]; Doherty, Declan <[email protected]>; Kusztal, ArkadiuszX <[email protected]>
Cc: Dybkowski, AdamX <[email protected]>
Subject: [PATCH v2 0/2] test/crypto: close PMD after testsThis patch adds closing of the PMD after running the tests.
--
v2:
* display error message on close errorAdam Dybkowski (2):
test/crypto: close PMD after tests app/crypto-perf: close PMD after benchmark run
Quoted 6 lines
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 <[email protected]>
v3 cover test/crypto: close PMD after tests
In reply to Adam DybkowskiThis 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(-)
Signature · 1 line
2.25.1
PATCH v3 1/2 test/crypto: close PMD after tests
This patch adds closing of the PMD after running the tests.
--- app/test/test_cryptodev.c | 5 +++++ 1 file changed, 5 insertions(+)
app/test/test_cryptodev.c +5 -0
@@ -842,6 +842,7 @@ static voidtestsuite_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
Signature · 1 line
2.25.1
PATCH v3 2/2 app/crypto-perf: close PMD after benchmark run
In reply to Adam DybkowskiThis patch adds closing of the PMD after running the benchmark.
--- app/test-crypto-perf/main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
app/test-crypto-perf/main.c +13 -2
@@ -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);
Signature · 1 line
2.25.1
Akhil Goyal
AppliedQuoted 5 lines
This patch adds closing of the PMD after running the tests.
--
v3:
* move the call fromut_teardowntotestsuite_teardown
Series Acked-by: Akhil Goyal <[email protected]>
Applied to dpdk-next-crypto
Thanks.