git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cryptodev: add function to retrieve device name
[dpdk.git]
/
lib
/
librte_cryptodev
/
rte_cryptodev.c
diff --git
a/lib/librte_cryptodev/rte_cryptodev.c
b/lib/librte_cryptodev/rte_cryptodev.c
index
a239395
..
e48d562
100644
(file)
--- a/
lib/librte_cryptodev/rte_cryptodev.c
+++ b/
lib/librte_cryptodev/rte_cryptodev.c
@@
-1381,6
+1381,17
@@
rte_cryptodev_driver_id_get(const char *name)
return -1;
}
return -1;
}
+const char *
+rte_cryptodev_name_get(uint8_t dev_id)
+{
+ struct rte_cryptodev *dev = rte_cryptodev_pmd_get_dev(dev_id);
+
+ if (dev == NULL)
+ return NULL;
+
+ return dev->data->name;
+}
+
const char *
rte_cryptodev_driver_name_get(uint8_t driver_id)
{
const char *
rte_cryptodev_driver_name_get(uint8_t driver_id)
{