git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: add flow sync API
[dpdk.git]
/
app
/
test
/
test_per_lcore.c
diff --git
a/app/test/test_per_lcore.c
b/app/test/test_per_lcore.c
index
19b55f2
..
129578d
100644
(file)
--- 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
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;
{
if (RTE_PER_LCORE(test) != 0x12345678)
return -1;
@@
-44,7
+44,7
@@
assign_vars(__attribute__((unused)) void *arg)
}
static int
}
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);
{
unsigned lcore_id = rte_lcore_id();
unsigned var = RTE_PER_LCORE(test);
@@
-59,7
+59,7
@@
display_vars(__attribute__((unused)) void *arg)
}
static int
}
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());
{
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;
unsigned lcore_id;
int ret;
- rte_eal_mp_remote_launch(assign_vars, NULL, SKIP_MA
STER
);
- RTE_LCORE_FOREACH_
SLAVE
(lcore_id) {
+ rte_eal_mp_remote_launch(assign_vars, NULL, SKIP_MA
IN
);
+ RTE_LCORE_FOREACH_
WORKER
(lcore_id) {
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
}
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
}
- rte_eal_mp_remote_launch(display_vars, NULL, SKIP_MA
STER
);
- RTE_LCORE_FOREACH_
SLAVE
(lcore_id) {
+ rte_eal_mp_remote_launch(display_vars, NULL, SKIP_MA
IN
);
+ 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 */
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_MA
STER
);
+ ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MA
IN
);
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 */
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_MA
STER
);
+ ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MA
IN
);
if (ret == 0) {
printf("It does remote launch successfully but it should not at this time\n");
return -1;
}
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;
}
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
}