From: Marko Kovacevic Date: Mon, 15 Apr 2019 15:04:48 +0000 (+0100) Subject: examples/fips_validation: fix CMAC test X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=083a277754f664d6f5d3af166f1f45ae0cb32cc3 examples/fips_validation: fix CMAC test As a result of the cmac test running the test where PT len is 65536 it should give a result back to the user USER1: Error -1: Prepare op USER1: PT len 65536 as this MSG len is not supported. Issue was that the application was not freeing the op properly after a while causing the app to fail. CRYPTODEV: rte_cryptodev_sym_session_create() line 1340: couldn't get object from session mempool USER1: Error -12: test block USER1: Error -12: Failed test CMAC/req/CMAC.req Fixes: cd255ccf5764 ("examples/fips_validation: support AES parsing") Cc: stable@dpdk.org Signed-off-by: Marko Kovacevic --- diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index 5e3d5baa8f..aef45055e8 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -949,19 +949,20 @@ fips_run_test(void) if (ret < 0) { RTE_LOG(ERR, USER1, "Error %i: Init session\n", ret); - return ret; + goto exit; } ret = test_ops.prepare_op(); if (ret < 0) { RTE_LOG(ERR, USER1, "Error %i: Prepare op\n", ret); - return ret; + goto exit; } if (rte_cryptodev_enqueue_burst(env.dev_id, 0, &env.op, 1) < 1) { RTE_LOG(ERR, USER1, "Error: Failed enqueue\n"); - return ret; + ret = -1; + goto exit; } do { @@ -973,6 +974,7 @@ fips_run_test(void) vec.status = env.op->status; +exit: rte_cryptodev_sym_session_clear(env.dev_id, env.sess); rte_cryptodev_sym_session_free(env.sess); env.sess = NULL;