MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_cryptodev_driver_id_get

Function rte_cryptodev_driver_id_get

dpdk/lib/cryptodev/rte_cryptodev.c:2691–2714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2689 TAILQ_HEAD_INITIALIZER(cryptodev_driver_list);
2690
2691int
2692rte_cryptodev_driver_id_get(const char *name)
2693{
2694 struct cryptodev_driver *driver;
2695 const char *driver_name;
2696 int driver_id = -1;
2697
2698 if (name == NULL) {
2699 CDEV_LOG_DEBUG("name pointer NULL");
2700 return -1;
2701 }
2702
2703 TAILQ_FOREACH(driver, &cryptodev_driver_list, next) {
2704 driver_name = driver->driver->name;
2705 if (strncmp(driver_name, name, strlen(driver_name) + 1) == 0) {
2706 driver_id = driver->id;
2707 break;
2708 }
2709 }
2710
2711 rte_cryptodev_trace_driver_id_get(name, driver_id);
2712
2713 return driver_id;
2714}
2715
2716const char *
2717rte_cryptodev_name_get(uint8_t dev_id)

Calls 1

strncmpFunction · 0.85