X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Ffips_validation%2Fmain.c;h=b0de3d269a1e1ff92681aa64bdc15dbd9e14edcc;hb=d047310407a3511b1e2910c7ddf59d5049b202f6;hp=c175fe6ac2d7a220aaa1eb88392fbebae45078b7;hpb=10aa375704c148d9e90b5e984066d719f7465357;p=dpdk.git diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index c175fe6ac2..b0de3d269a 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include #include @@ -73,10 +73,7 @@ cryptodev_fips_validate_app_int(void) if (env.self_test) { ret = fips_dev_self_test(env.dev_id, env.broken_test_config); if (ret < 0) { - struct rte_cryptodev *cryptodev = - rte_cryptodev_pmd_get_dev(env.dev_id); - - rte_cryptodev_pmd_destroy(cryptodev); + rte_cryptodev_close(env.dev_id); return ret; } @@ -196,7 +193,7 @@ parse_cryptodev_id_arg(char *arg) } - if (!rte_cryptodev_pmd_is_valid_dev(cryptodev_id)) { + if (!rte_cryptodev_is_valid_dev(cryptodev_id)) { RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n", cryptodev_id, arg); return -1; @@ -1635,7 +1632,6 @@ fips_mct_sha_test(void) int ret; uint32_t i, j; - val.val = rte_malloc(NULL, (MAX_DIGEST_SIZE*SHA_MD_BLOCK), 0); for (i = 0; i < SHA_MD_BLOCK; i++) md[i].val = rte_malloc(NULL, (MAX_DIGEST_SIZE*2), 0); @@ -1847,8 +1843,10 @@ error_one_case: fips_test_clear(); - if (env.digest) + if (env.digest) { rte_free(env.digest); + env.digest = NULL; + } if (env.mbuf) rte_pktmbuf_free(env.mbuf);