[dpdk-stable] patch 'eal/windows: fix CPU cores counting' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:29:57 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/822f885986d147ff689f6b7c0ae55995bacbb12d

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 822f885986d147ff689f6b7c0ae55995bacbb12d Mon Sep 17 00:00:00 2001
From: Narcisa Vasile <navasile at microsoft.com>
Date: Wed, 18 Aug 2021 06:46:00 -0700
Subject: [PATCH] eal/windows: fix CPU cores counting
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 694c81721ef0a04432cd725642cfe74075a32f19 ]

On Windows, -l/--lcores EAL option was unable to process CPU sets
containing CPUs other than 0 and 1, because CPU_COUNT() macro
only checked these CPUs in the set. Fix CPU_COUNT() by enumerating
all possible CPU indices.

Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")

Signed-off-by: Narcisa Vasile <navasile at microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam at intel.com>
---
 lib/librte_eal/windows/include/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/windows/include/sched.h b/lib/librte_eal/windows/include/sched.h
index ff572b5dcb..bc31cc8465 100644
--- a/lib/librte_eal/windows/include/sched.h
+++ b/lib/librte_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.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.014519227 +0800
+++ 0113-eal-windows-fix-CPU-cores-counting.patch	2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 694c81721ef0a04432cd725642cfe74075a32f19 Mon Sep 17 00:00:00 2001
+From 822f885986d147ff689f6b7c0ae55995bacbb12d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 694c81721ef0a04432cd725642cfe74075a32f19 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -18 +20 @@
- lib/eal/windows/include/sched.h | 2 +-
+ lib/librte_eal/windows/include/sched.h | 2 +-
@@ -21 +23 @@
-diff --git a/lib/eal/windows/include/sched.h b/lib/eal/windows/include/sched.h
+diff --git a/lib/librte_eal/windows/include/sched.h b/lib/librte_eal/windows/include/sched.h
@@ -23,2 +25,2 @@
---- a/lib/eal/windows/include/sched.h
-+++ b/lib/eal/windows/include/sched.h
+--- a/lib/librte_eal/windows/include/sched.h
++++ b/lib/librte_eal/windows/include/sched.h


More information about the stable mailing list