X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_per_lcore.c;h=129578d1a30f925ed3ff9438fe2f8bcff3aeb480;hb=23f627e0ed28;hp=19b55f26423c3431392ccf81a8a835f9c6f14854;hpb=a9de470cc7c0649221e156fc5f30a2dbdfe7c166;p=dpdk.git diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c index 19b55f2642..129578d1a3 100644 --- a/app/test/test_per_lcore.c +++ b/app/test/test_per_lcore.c @@ -35,7 +35,7 @@ static RTE_DEFINE_PER_LCORE(unsigned, test) = 0x12345678; static int -assign_vars(__attribute__((unused)) void *arg) +assign_vars(__rte_unused void *arg) { if (RTE_PER_LCORE(test) != 0x12345678) return -1; @@ -44,7 +44,7 @@ assign_vars(__attribute__((unused)) void *arg) } static int -display_vars(__attribute__((unused)) void *arg) +display_vars(__rte_unused void *arg) { unsigned lcore_id = rte_lcore_id(); unsigned var = RTE_PER_LCORE(test); @@ -59,7 +59,7 @@ display_vars(__attribute__((unused)) void *arg) } static int -test_per_lcore_delay(__attribute__((unused)) void *arg) +test_per_lcore_delay(__rte_unused void *arg) { rte_delay_ms(100); printf("wait 100ms on lcore %u\n", rte_lcore_id()); @@ -73,31 +73,31 @@ test_per_lcore(void) unsigned lcore_id; int ret; - rte_eal_mp_remote_launch(assign_vars, NULL, SKIP_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(assign_vars, NULL, SKIP_MAIN); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } - rte_eal_mp_remote_launch(display_vars, NULL, SKIP_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(display_vars, NULL, SKIP_MAIN); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } /* test if it could do remote launch twice at the same time or not */ - ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MASTER); + ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MAIN); if (ret < 0) { printf("It fails to do remote launch but it should able to do\n"); return -1; } /* it should not be able to launch a lcore which is running */ - ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MASTER); + ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MAIN); if (ret == 0) { printf("It does remote launch successfully but it should not at this time\n"); return -1; } - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; }