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

Function rte_cryptodev_devices_get

dpdk/lib/cryptodev/rte_cryptodev.c:916–942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

914}
915
916uint8_t
917rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
918 uint8_t nb_devices)
919{
920 uint8_t i, count = 0;
921 struct rte_cryptodev *devs = cryptodev_globals.devs;
922
923 for (i = 0; i < RTE_CRYPTO_MAX_DEVS && count < nb_devices; i++) {
924 if (!rte_cryptodev_is_valid_device_data(i))
925 continue;
926
927 if (devs[i].attached == RTE_CRYPTODEV_ATTACHED) {
928 int cmp;
929
930 cmp = strncmp(devs[i].device->driver->name,
931 driver_name,
932 strlen(driver_name) + 1);
933
934 if (cmp == 0)
935 devices[count++] = devs[i].data->dev_id;
936 }
937 }
938
939 rte_cryptodev_trace_devices_get(driver_name, count);
940
941 return count;
942}
943
944void *
945rte_cryptodev_get_sec_ctx(uint8_t dev_id)

Callers 3

testsuite_setupFunction · 0.85
cryptodev_initFunction · 0.85

Calls 2

strncmpFunction · 0.85

Tested by 2

testsuite_setupFunction · 0.68
cryptodev_initFunction · 0.68