From: Igor Romanov Date: Tue, 7 Jul 2020 10:45:24 +0000 (+0100) Subject: service: fix lcore iteration X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f3c256b621262e581d3edcca383df83875ab7ebe;p=dpdk.git 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: e484ccddbe1b ("service: avoid false sharing on core state") Cc: stable@dpdk.org Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko Acked-by: Harry van Haaren Reviewed-by: Honnappa Nagarahalli --- diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index 6123a2124d..e2795f857e 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -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; }