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

Function alloc_lcore

dpdk/app/test/test_pmd_perf.c:267–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267static uint16_t
268alloc_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
286static volatile uint64_t stop;
287static uint64_t count;

Callers 1

test_pmd_perfFunction · 0.85

Calls 1

rte_get_main_lcoreFunction · 0.85

Tested by

no test coverage detected