X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Ffips_validation%2Ffips_dev_self_test.c;h=b4eab05a9851afae5a3603390c76649ca50aa81a;hb=c5e6bc12a319d4500d931ca84d4227e4d7495956;hp=444bbaa7966637232859f560450f3f96167779ed;hpb=6da6a83ee0f512d5eff0cce8725651cd407e81da;p=dpdk.git diff --git a/examples/fips_validation/fips_dev_self_test.c b/examples/fips_validation/fips_dev_self_test.c index 444bbaa796..b4eab05a98 100644 --- a/examples/fips_validation/fips_dev_self_test.c +++ b/examples/fips_validation/fips_dev_self_test.c @@ -3,7 +3,7 @@ */ #include -#include +#include #include "fips_dev_self_test.h" @@ -1523,12 +1523,6 @@ static void fips_dev_auto_test_uninit(uint8_t dev_id, struct fips_dev_auto_test_env *env) { - struct rte_cryptodev *dev = rte_cryptodev_pmd_get_dev(dev_id); - uint32_t i; - - if (!dev) - return; - if (env->mbuf) rte_pktmbuf_free(env->mbuf); if (env->op) @@ -1542,27 +1536,22 @@ fips_dev_auto_test_uninit(uint8_t dev_id, if (env->sess_priv_pool) rte_mempool_free(env->sess_priv_pool); - if (dev->data->dev_started) - rte_cryptodev_stop(dev_id); - - if (dev->data->nb_queue_pairs) { - for (i = 0; i < dev->data->nb_queue_pairs; i++) - (*dev->dev_ops->queue_pair_release)(dev, i); - dev->data->nb_queue_pairs = 0; - rte_free(dev->data->queue_pairs); - dev->data->queue_pairs = NULL; - } + rte_cryptodev_stop(dev_id); } static int fips_dev_auto_test_init(uint8_t dev_id, struct fips_dev_auto_test_env *env) { - struct rte_cryptodev_config conf = {rte_cryptodev_socket_id(dev_id), 1}; struct rte_cryptodev_qp_conf qp_conf = {128, NULL, NULL}; uint32_t sess_sz = rte_cryptodev_sym_get_private_session_size(dev_id); + struct rte_cryptodev_config conf; char name[128]; int ret; + conf.socket_id = rte_cryptodev_socket_id(dev_id); + conf.nb_queue_pairs = 1; + conf.ff_disable = 0; + ret = rte_cryptodev_configure(dev_id, &conf); if (ret < 0) return ret;