[dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' has been queued to stable release 19.11.7

Christian Ehrhardt christian.ehrhardt at canonical.com
Thu Feb 4 12:28:21 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/06/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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/60e01fe034770aba98b182d6a9ff7ae8500e1983

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 60e01fe034770aba98b182d6a9ff7ae8500e1983 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz at 6wind.com>
Date: Wed, 4 Nov 2020 18:04:25 +0100
Subject: [PATCH] test/mcslock: remove unneeded per lcore copy

[ upstream commit 5b3ada04f7d57b6770d41ccff4a2485e5616bc52 ]

Each core already comes with its local storage for mcslock (in its
stack), therefore there is no need to define an additional per-lcore
mcslock.

Fixes: 32dcb9fd2a22 ("test/mcslock: add MCS queued lock unit test")

Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
---
 app/test/test_mcslock.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c
index e9359df2ee..b70dd4775b 100644
--- a/app/test/test_mcslock.c
+++ b/app/test/test_mcslock.c
@@ -37,10 +37,6 @@
  *   lock multiple times.
  */
 
-RTE_DEFINE_PER_LCORE(rte_mcslock_t, _ml_me);
-RTE_DEFINE_PER_LCORE(rte_mcslock_t, _ml_try_me);
-RTE_DEFINE_PER_LCORE(rte_mcslock_t, _ml_perf_me);
-
 rte_mcslock_t *p_ml;
 rte_mcslock_t *p_ml_try;
 rte_mcslock_t *p_ml_perf;
@@ -53,7 +49,7 @@ static int
 test_mcslock_per_core(__attribute__((unused)) void *arg)
 {
 	/* Per core me node. */
-	rte_mcslock_t ml_me = RTE_PER_LCORE(_ml_me);
+	rte_mcslock_t ml_me;
 
 	rte_mcslock_lock(&p_ml, &ml_me);
 	printf("MCS lock taken on core %u\n", rte_lcore_id());
@@ -77,7 +73,7 @@ load_loop_fn(void *func_param)
 	const unsigned int lcore = rte_lcore_id();
 
 	/**< Per core me node. */
-	rte_mcslock_t ml_perf_me = RTE_PER_LCORE(_ml_perf_me);
+	rte_mcslock_t ml_perf_me;
 
 	/* wait synchro */
 	while (rte_atomic32_read(&synchro) == 0)
@@ -151,8 +147,8 @@ static int
 test_mcslock_try(__attribute__((unused)) void *arg)
 {
 	/**< Per core me node. */
-	rte_mcslock_t ml_me     = RTE_PER_LCORE(_ml_me);
-	rte_mcslock_t ml_try_me = RTE_PER_LCORE(_ml_try_me);
+	rte_mcslock_t ml_me;
+	rte_mcslock_t ml_try_me;
 
 	/* Locked ml_try in the master lcore, so it should fail
 	 * when trying to lock it in the slave lcore.
@@ -178,8 +174,8 @@ test_mcslock(void)
 	int i;
 
 	/* Define per core me node. */
-	rte_mcslock_t ml_me     = RTE_PER_LCORE(_ml_me);
-	rte_mcslock_t ml_try_me = RTE_PER_LCORE(_ml_try_me);
+	rte_mcslock_t ml_me;
+	rte_mcslock_t ml_try_me;
 
 	/*
 	 * Test mcs lock & unlock on each core
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.018421561 +0100
+++ 0046-test-mcslock-remove-unneeded-per-lcore-copy.patch	2021-02-04 12:04:27.958789659 +0100
@@ -1 +1 @@
-From 5b3ada04f7d57b6770d41ccff4a2485e5616bc52 Mon Sep 17 00:00:00 2001
+From 60e01fe034770aba98b182d6a9ff7ae8500e1983 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b3ada04f7d57b6770d41ccff4a2485e5616bc52 ]
+
@@ -19 +21 @@
-index fbca78707d..80eaecc90a 100644
+index e9359df2ee..b70dd4775b 100644
@@ -34 +36 @@
- test_mcslock_per_core(__rte_unused void *arg)
+ test_mcslock_per_core(__attribute__((unused)) void *arg)
@@ -52 +54 @@
- test_mcslock_try(__rte_unused void *arg)
+ test_mcslock_try(__attribute__((unused)) void *arg)
@@ -60,2 +62,2 @@
- 	/* Locked ml_try in the main lcore, so it should fail
- 	 * when trying to lock it in the worker lcore.
+ 	/* Locked ml_try in the master lcore, so it should fail
+ 	 * when trying to lock it in the slave lcore.


More information about the stable mailing list