Type: fix
Not specifying main core with 'skip-cores' attribute can result
in launch issues e.g. if main thread pinned automatically by
scheduler to a cpu in 'skip-cores' range.
Change-Id: Ie47b3691e25ed4ff5d53887d3e1d5e8cb2be00b9
Signed-off-by: Hadi Rayan Al-Sandid <[email protected]>
if (use_corelist && tm->main_lcore == ~0)
return clib_error_return (0, "main-core must be specified when using "
"corelist-* or coremask-* attribute");
+
+ if (tm->skip_cores != 0 && tm->main_lcore == ~0)
+ return clib_error_return (
+ 0, "main-core must be specified when using skip-cores attribute");
+
if (tm->sched_priority != ~0)
{
if (tm->sched_policy == SCHED_FIFO || tm->sched_policy == SCHED_RR)