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

Function eth_dev_allocated

dpdk/lib/ethdev/ethdev_driver.c:31–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29} eth_dev_switch_domains[RTE_MAX_ETHPORTS];
30
31static struct rte_eth_dev *
32eth_dev_allocated(const char *name)
33{
34 uint16_t i;
35
36 RTE_BUILD_BUG_ON(RTE_MAX_ETHPORTS >= UINT16_MAX);
37
38 for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
39 if (rte_eth_devices[i].data != NULL &&
40 strcmp(rte_eth_devices[i].data->name, name) == 0)
41 return &rte_eth_devices[i];
42 }
43 return NULL;
44}
45
46static uint16_t
47eth_dev_find_free_port(void)

Callers 2

rte_eth_dev_allocateFunction · 0.85
rte_eth_dev_allocatedFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected