DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH 1/2] service: fix service lcore stop function
@ 2017-09-05 14:10 Guduri Prathyusha
  2017-09-05 14:10 ` [dpdk-dev] [PATCH 2/2] service: fix service lcore start stop unit test Guduri Prathyusha
  2017-09-05 14:34 ` [dpdk-dev] [PATCH 1/2] service: fix service lcore stop function Van Haaren, Harry
  0 siblings, 2 replies; 4+ messages in thread
From: Guduri Prathyusha @ 2017-09-05 14:10 UTC (permalink / raw)
  To: harry.van.haaren; +Cc: dev, Guduri Prathyusha

lcore_states store the state of the lcore. Fixing the invalid
dereference of lcore_states with service number

Fixes: 21698354c832 ("service: introduce service cores concept")

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.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 7efb76dc8..2ac77cc2a 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -609,7 +609,7 @@ rte_service_lcore_stop(uint32_t lcore)
 	uint32_t i;
 	for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {
 		int32_t enabled =
-			lcore_states[i].service_mask & (UINT64_C(1) << i);
+			lcore_states[lcore].service_mask & (UINT64_C(1) << i);
 		int32_t service_running = rte_services[i].runstate !=
 						RUNSTATE_STOPPED;
 		int32_t only_core = rte_services[i].num_mapped_cores == 1;
-- 
2.14.1

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

end of thread, other threads:[~2017-09-05 16:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 14:10 [dpdk-dev] [PATCH 1/2] service: fix service lcore stop function Guduri Prathyusha
2017-09-05 14:10 ` [dpdk-dev] [PATCH 2/2] service: fix service lcore start stop unit test Guduri Prathyusha
2017-09-05 14:34 ` [dpdk-dev] [PATCH 1/2] service: fix service lcore stop function Van Haaren, Harry
2017-09-05 16:02   ` Guduri Prathyusha

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).