DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] service: fix wrong lcore indexes
@ 2020-07-04 14:35 Andrew Rybchenko
  2020-07-04 15:06 ` Honnappa Nagarahalli
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Andrew Rybchenko @ 2020-07-04 14:35 UTC (permalink / raw)
  To: dev; +Cc: Igor Romanov, stable, Harry van Haaren

From: Igor Romanov <igor.romanov@oktetlabs.ru>

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: e30dd31847d2 ("service: add mechanism for quiescing")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_eal/common/rte_service.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-07-07 21:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04 14:35 [dpdk-dev] [PATCH] service: fix wrong lcore indexes Andrew Rybchenko
2020-07-04 15:06 ` Honnappa Nagarahalli
2020-07-04 15:10   ` David Marchand
2020-07-06 11:09     ` Andrew Rybchenko
2020-07-06 11:05 ` [dpdk-dev] [PATCH v2 1/2] service: fix wrong lcore indices Andrew Rybchenko
2020-07-06 11:06   ` [dpdk-dev] [PATCH v2 2/2] test/service: add test for service active on two lcores Andrew Rybchenko
2020-07-07 10:45 ` [dpdk-dev] [PATCH v3 1/2] service: fix wrong lcore indices Andrew Rybchenko
2020-07-07 10:45   ` [dpdk-dev] [PATCH v3 2/2] test/service: add test for service active on two lcores Andrew Rybchenko
2020-07-07 13:14     ` Van Haaren, Harry
2020-07-07 19:47     ` Honnappa Nagarahalli
2020-07-07 13:14   ` [dpdk-dev] [PATCH v3 1/2] service: fix wrong lcore indices Van Haaren, Harry
2020-07-07 21:56     ` Thomas Monjalon
2020-07-07 19:33   ` Honnappa Nagarahalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).