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

Function test_lcores

dpdk/app/test/test_lcores.c:381–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381static int
382test_lcores(void)
383{
384 unsigned int eal_threads_count = 0;
385 unsigned int i;
386
387 for (i = 0; i < RTE_MAX_LCORE; i++) {
388 if (!rte_lcore_has_role(i, ROLE_OFF))
389 eal_threads_count++;
390 }
391 if (eal_threads_count == 0) {
392 printf("Error: something is broken, no EAL thread detected.\n");
393 return TEST_FAILED;
394 }
395 printf("EAL threads count: %u, RTE_MAX_LCORE=%u\n", eal_threads_count,
396 RTE_MAX_LCORE);
397 rte_lcore_dump(stdout);
398
399 if (test_non_eal_lcores(eal_threads_count) < 0)
400 return TEST_FAILED;
401
402 if (test_lcores_callback(eal_threads_count) < 0)
403 return TEST_FAILED;
404
405 if (test_non_eal_lcores_callback(eal_threads_count) < 0)
406 return TEST_FAILED;
407
408 if (test_ctrl_thread() < 0)
409 return TEST_FAILED;
410
411 return TEST_SUCCESS;
412}
413
414REGISTER_FAST_TEST(lcores_autotest, true, true, test_lcores);

Callers

nothing calls this directly

Calls 7

rte_lcore_has_roleFunction · 0.85
rte_lcore_dumpFunction · 0.85
test_non_eal_lcoresFunction · 0.85
test_lcores_callbackFunction · 0.85
test_ctrl_threadFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected