[dpdk-stable] patch 'examples/eventdev: fix 32-bit coremask' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:58:32 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.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 07/26/20. 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.

Thanks.

Luca Boccassi

---
>From 11908b39262384c5a2cd96e6a27ef5b259e61e49 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren at intel.com>
Date: Tue, 16 Jun 2020 17:56:03 +0100
Subject: [PATCH] examples/eventdev: fix 32-bit coremask

[ upstream commit ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 ]

This commit fixes a bug in 32-bit environments when a core mask greater
than 32-bits is requested. The fix is to convert the bitmask logic to
64 bits, aligning 64 and 32 bit implementations.

Fixes: adb5d548 ("examples/eventdev_pipeline_sw_pmd: add sample app")

Reported-by: Jun W Zhou <junx.w.zhou at intel.com>
Suggested-by: Mao Jiang <maox.jiang at intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
---
 examples/eventdev_pipeline/main.c            | 10 +++++-----
 examples/eventdev_pipeline/pipeline_common.h |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index 21958269f..4ac582153 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -81,7 +81,7 @@ parse_coremask(const char *coremask)
 		val = xdigit2val(c);
 		for (j = 0; j < BITS_HEX && idx < MAX_NUM_CORE; j++, idx++) {
 			if ((1 << j) & val) {
-				mask |= (1UL << idx);
+				mask |= (1ULL << idx);
 				count++;
 			}
 		}
@@ -232,10 +232,10 @@ parse_app_args(int argc, char **argv)
 		usage();
 
 	for (i = 0; i < MAX_NUM_CORE; i++) {
-		fdata->rx_core[i] = !!(rx_lcore_mask & (1UL << i));
-		fdata->tx_core[i] = !!(tx_lcore_mask & (1UL << i));
-		fdata->sched_core[i] = !!(sched_lcore_mask & (1UL << i));
-		fdata->worker_core[i] = !!(worker_lcore_mask & (1UL << i));
+		fdata->rx_core[i] = !!(rx_lcore_mask & (1ULL << i));
+		fdata->tx_core[i] = !!(tx_lcore_mask & (1ULL << i));
+		fdata->sched_core[i] = !!(sched_lcore_mask & (1ULL << i));
+		fdata->worker_core[i] = !!(worker_lcore_mask & (1ULL << i));
 
 		if (fdata->worker_core[i])
 			cdata.num_workers++;
diff --git a/examples/eventdev_pipeline/pipeline_common.h b/examples/eventdev_pipeline/pipeline_common.h
index c7245f7f0..6a4287602 100644
--- a/examples/eventdev_pipeline/pipeline_common.h
+++ b/examples/eventdev_pipeline/pipeline_common.h
@@ -51,10 +51,10 @@ struct fastpath_data {
 	bool rx_single;
 	bool tx_single;
 	bool sched_single;
-	unsigned int rx_core[MAX_NUM_CORE];
-	unsigned int tx_core[MAX_NUM_CORE];
-	unsigned int sched_core[MAX_NUM_CORE];
-	unsigned int worker_core[MAX_NUM_CORE];
+	uint64_t rx_core[MAX_NUM_CORE];
+	uint64_t tx_core[MAX_NUM_CORE];
+	uint64_t sched_core[MAX_NUM_CORE];
+	uint64_t worker_core[MAX_NUM_CORE];
 	struct setup_data cap;
 } __rte_cache_aligned;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.431352056 +0100
+++ 0074-examples-eventdev-fix-32-bit-coremask.patch	2020-07-24 12:53:48.299006683 +0100
@@ -1,14 +1,15 @@
-From ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 Mon Sep 17 00:00:00 2001
+From 11908b39262384c5a2cd96e6a27ef5b259e61e49 Mon Sep 17 00:00:00 2001
 From: Harry van Haaren <harry.van.haaren at intel.com>
 Date: Tue, 16 Jun 2020 17:56:03 +0100
 Subject: [PATCH] examples/eventdev: fix 32-bit coremask
 
+[ upstream commit ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 ]
+
 This commit fixes a bug in 32-bit environments when a core mask greater
 than 32-bits is requested. The fix is to convert the bitmask logic to
 64 bits, aligning 64 and 32 bit implementations.
 
 Fixes: adb5d548 ("examples/eventdev_pipeline_sw_pmd: add sample app")
-Cc: stable at dpdk.org
 
 Reported-by: Jun W Zhou <junx.w.zhou at intel.com>
 Suggested-by: Mao Jiang <maox.jiang at intel.com>


More information about the stable mailing list