summaryrefslogtreecommitdiffstats
path: root/examples/bond/main.c
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo.salveti@linaro.org>2016-07-18 15:30:06 -0300
committerRicardo Salveti <ricardo.salveti@linaro.org>2016-07-18 15:30:30 -0300
commita41e6ff15809d40e0f9bbc9576bf8f7f80fbec1d (patch)
treec9e6fc399c2738e84ed2585e6e51e90f9608ca12 /examples/bond/main.c
parent8b25d1ad5d2264bdfc2818c7bda74ee2697df6db (diff)
Imported Upstream version 16.07-rc2
Change-Id: Ie9e8ec528a2a0dace085c5e44aa7fa3b489d4ba0 Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Diffstat (limited to 'examples/bond/main.c')
-rw-r--r--examples/bond/main.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 53bd0441..776fad0a 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -590,10 +590,14 @@ static void cmd_stop_parsed(__attribute__((unused)) void *parsed_result,
return;
}
global_flag_stru_p->LcoreMainIsRunning = 0;
- rte_eal_wait_lcore(global_flag_stru_p->LcoreMainCore);
- cmdline_printf(cl,
- "lcore_main stopped on core:%d\n",
- global_flag_stru_p->LcoreMainCore);
+ if (rte_eal_wait_lcore(global_flag_stru_p->LcoreMainCore) < 0)
+ cmdline_printf(cl,
+ "error: lcore_main can not stop on core:%d\n",
+ global_flag_stru_p->LcoreMainCore);
+ else
+ cmdline_printf(cl,
+ "lcore_main stopped on core:%d\n",
+ global_flag_stru_p->LcoreMainCore);
rte_spinlock_unlock(&global_flag_stru_p->lock);
}
@@ -628,10 +632,14 @@ static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
return;
}
global_flag_stru_p->LcoreMainIsRunning = 0;
- rte_eal_wait_lcore(global_flag_stru_p->LcoreMainCore);
- cmdline_printf(cl,
- "lcore_main stopped on core:%d\n",
- global_flag_stru_p->LcoreMainCore);
+ if (rte_eal_wait_lcore(global_flag_stru_p->LcoreMainCore) < 0)
+ cmdline_printf(cl,
+ "error: lcore_main can not stop on core:%d\n",
+ global_flag_stru_p->LcoreMainCore);
+ else
+ cmdline_printf(cl,
+ "lcore_main stopped on core:%d\n",
+ global_flag_stru_p->LcoreMainCore);
rte_spinlock_unlock(&global_flag_stru_p->lock);
cmdline_quit(cl);
}