| 29 | } eth_dev_switch_domains[RTE_MAX_ETHPORTS]; |
| 30 | |
| 31 | static struct rte_eth_dev * |
| 32 | eth_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 | |
| 46 | static uint16_t |
| 47 | eth_dev_find_free_port(void) |
no test coverage detected