The example has various profiles to run services on specified
number of lcores. Due to incorrect boundary condition, service
can be dispatched to a core that does not exist. This puts main
core into endless wait.
Max available number of service cores is all detected lcores
excluding main core.
Fixes:
7f6ee6aee717 ("examples/service_cores: check cores before run")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
struct profile *p = &profiles[profile_id];
const uint8_t core_off = 1;
- if (p->num_cores > rte_lcore_count() + 1) {
+ if (p->num_cores > rte_lcore_count() - 1) {
printf("insufficent cores to run (%s)",
p->name);
return;