| 265 | } |
| 266 | |
| 267 | static uint16_t |
| 268 | alloc_lcore(int socketid) |
| 269 | { |
| 270 | unsigned lcore_id; |
| 271 | |
| 272 | for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { |
| 273 | if (LCORE_AVAIL != lcore_conf[lcore_id].status || |
| 274 | (socketid != SOCKET_ID_ANY && |
| 275 | lcore_conf[lcore_id].socketid != socketid) || |
| 276 | lcore_id == rte_get_main_lcore()) |
| 277 | continue; |
| 278 | lcore_conf[lcore_id].status = LCORE_USED; |
| 279 | lcore_conf[lcore_id].nb_ports = 0; |
| 280 | return lcore_id; |
| 281 | } |
| 282 | |
| 283 | return (uint16_t)-1; |
| 284 | } |
| 285 | |
| 286 | static volatile uint64_t stop; |
| 287 | static uint64_t count; |
no test coverage detected