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

Function rte_rawdev_get_dev_id

dpdk/lib/rawdev/rte_rawdev.c:38–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38uint16_t
39rte_rawdev_get_dev_id(const char *name)
40{
41 uint16_t i;
42
43 if (!name)
44 return -EINVAL;
45
46 for (i = 0; i < rawdev_globals.nb_devs; i++)
47 if ((strcmp(rte_rawdevices[i].name, name)
48 == 0) &&
49 (rte_rawdevices[i].attached ==
50 RTE_RAWDEV_ATTACHED))
51 return i;
52 return -ENODEV;
53}
54
55int
56rte_rawdev_socket_id(uint16_t dev_id)

Callers 2

test_rawdev_get_dev_idFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by 2

test_rawdev_get_dev_idFunction · 0.68