X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=lib%2Flibrte_cryptodev%2Frte_cryptodev.c;h=c836a2c1413f0454a70f340d916c0c9eb3ae54e3;hb=fdd2322bb45e83d3fd96b06ea32a4afbb60bcb6f;hp=127e8d0d461ec590615978552be5bdc04f67a2f2;hpb=6b3e017e5d25f15da73f7700f7f2ac553ef1a2e9;p=deb_dpdk.git diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 127e8d0d..c836a2c1 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -225,13 +225,14 @@ rte_cryptodev_create_vdev(const char *name, const char *args) } int -rte_cryptodev_get_dev_id(const char *name) { +rte_cryptodev_get_dev_id(const char *name) +{ unsigned i; if (name == NULL) return -1; - for (i = 0; i < rte_cryptodev_globals->max_devs; i++) + for (i = 0; i < rte_cryptodev_globals->nb_devs; i++) if ((strcmp(rte_cryptodev_globals->devs[i].data->name, name) == 0) && (rte_cryptodev_globals->devs[i].attached == @@ -736,8 +737,8 @@ rte_cryptodev_stop(uint8_t dev_id) return; } - dev->data->dev_started = 0; (*dev->dev_ops->dev_stop)(dev); + dev->data->dev_started = 0; } int