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

Function rte_cryptodev_get_dev_id

dpdk/lib/cryptodev/rte_cryptodev.c:866–890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864}
865
866int
867rte_cryptodev_get_dev_id(const char *name)
868{
869 unsigned i;
870 int ret = -1;
871
872 if (name == NULL)
873 return -1;
874
875 for (i = 0; i < RTE_CRYPTO_MAX_DEVS; i++) {
876 if (!rte_cryptodev_is_valid_device_data(i))
877 continue;
878 if ((strcmp(cryptodev_globals.devs[i].data->name, name)
879 == 0) &&
880 (cryptodev_globals.devs[i].attached ==
881 RTE_CRYPTODEV_ATTACHED)) {
882 ret = (int)i;
883 break;
884 }
885 }
886
887 rte_cryptodev_trace_get_dev_id(name, ret);
888
889 return ret;
890}
891
892uint8_t
893rte_cryptodev_count(void)

Callers 4

rte_swx_ipsec_createFunction · 0.85
cryptodev_createFunction · 0.85
cryptodev_configFunction · 0.85
parse_cryptodev_argFunction · 0.85

Calls 2

strcmpFunction · 0.85

Tested by

no test coverage detected