service: fix lcore iteration

The service core list is populated, but not used. Incorrect
lcore states are examined for a service.

Use the populated list to iterate over service cores.

Fixes: e484ccddbe ("service: avoid false sharing on core state")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
This commit is contained in:
Igor Romanov 2020-07-07 11:45:24 +01:00 committed by Thomas Monjalon
parent b2a0b9f044
commit f3c256b621

View File

@ -422,7 +422,7 @@ rte_service_may_be_active(uint32_t id)
return -EINVAL;
for (i = 0; i < lcore_count; i++) {
if (lcore_states[i].service_active_on_lcore[id])
if (lcore_states[ids[i]].service_active_on_lcore[id])
return 1;
}