examples/service_cores: fix lcore count check
authorRuifeng Wang <ruifeng.wang@arm.com>
Mon, 30 Aug 2021 08:04:12 +0000 (16:04 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 16 Sep 2021 15:31:03 +0000 (17:31 +0200)
commit328720c594f235aa44c78fe360e8e6f31b5e989f
tree3936f426bcb131d01f2ed5692cb2fe36c863cc7e
parent7df485eb3d56fbe5e6fcd160d33ca971bc3d3572
examples/service_cores: fix lcore count check

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>
examples/service_cores/main.c