test/crypto: reset device after asym tests

Message ID 20221111135319.1033-1-anoobj@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series test/crypto: reset device after asym tests |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Anoob Joseph Nov. 11, 2022, 1:53 p.m. UTC
  Reset the crypto device after asym tests so that the state from
asymmetric tests won't affect the tests executed later.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev_asym.c | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Akhil Goyal Nov. 15, 2022, 9:29 a.m. UTC | #1
> Subject: [PATCH] test/crypto: reset device after asym tests
> 
> Reset the crypto device after asym tests so that the state from
> asymmetric tests won't affect the tests executed later.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 9da54530e5..c58c7f488b 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -904,6 +904,12 @@  testsuite_teardown(void)
 {
 	struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
 
+	/* Reset device */
+	ts_params->qp_conf.mp_session = NULL;
+	ts_params->conf.ff_disable = 0;
+	if (rte_cryptodev_configure(ts_params->valid_devs[0], &ts_params->conf))
+		RTE_LOG(DEBUG, USER1, "Could not reset cryptodev\n");
+
 	if (ts_params->op_mpool != NULL) {
 		RTE_LOG(DEBUG, USER1, "CRYPTO_OP_POOL count %u\n",
 		rte_mempool_avail_count(ts_params->op_mpool));