DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal/windows: ensure all the CPUs in the set are checked
@ 2021-06-25  0:27 Narcisa Ana Maria Vasile
  2021-06-25  8:36 ` Dmitry Kozlyuk
  2021-06-30  1:56 ` [dpdk-dev] [PATCH v2] eal/windows: ensure all enabled CPUs are counted Narcisa Ana Maria Vasile
  0 siblings, 2 replies; 9+ messages in thread
From: Narcisa Ana Maria Vasile @ 2021-06-25  0:27 UTC (permalink / raw)
  To: dev, thomas, dmitry.kozliuk, ocardona, pallavi.kadam, talshn, dmitrym
  Cc: Narcisa Vasile

From: Narcisa Vasile <navasile@microsoft.com>

Fix count_cpu() to ensure it iterates through all the CPUs in a set.
count_cpu() iterates through the CPUs in the set 's' and counts the
selected ones.

Previously, it was incorrectly using the number of CPUSETS to iterate
through the CPUs.

Signed-off-by: Narcisa Vasile <navasile@microsoft.com>
---
 lib/eal/windows/include/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/windows/include/sched.h b/lib/eal/windows/include/sched.h
index ff572b5dcb..bc31cc8465 100644
--- a/lib/eal/windows/include/sched.h
+++ b/lib/eal/windows/include/sched.h
@@ -49,7 +49,7 @@ count_cpu(rte_cpuset_t *s)
 	unsigned int _i;
 	int count = 0;
 
-	for (_i = 0; _i < _NUM_SETS(CPU_SETSIZE); _i++)
+	for (_i = 0; _i < CPU_SETSIZE; _i++)
 		if (CPU_ISSET(_i, s) != 0LL)
 			count++;
 	return count;
-- 
2.31.0.vfs.0.1


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

end of thread, other threads:[~2021-10-11 18:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25  0:27 [dpdk-dev] [PATCH] eal/windows: ensure all the CPUs in the set are checked Narcisa Ana Maria Vasile
2021-06-25  8:36 ` Dmitry Kozlyuk
2021-06-30  2:02   ` Narcisa Ana Maria Vasile
2021-06-30  1:56 ` [dpdk-dev] [PATCH v2] eal/windows: ensure all enabled CPUs are counted Narcisa Ana Maria Vasile
2021-08-04 14:56   ` Dmitry Kozlyuk
2021-08-04 20:40   ` Kadam, Pallavi
2021-08-18 13:46   ` [dpdk-dev] [PATCH v3] " Narcisa Ana Maria Vasile
2021-10-08 23:56     ` Narcisa Ana Maria Vasile
2021-10-11 18:48     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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