From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C91B9A0524 for ; Thu, 4 Feb 2021 12:35:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C27CC24075A; Thu, 4 Feb 2021 12:35:27 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 9D479240753 for ; Thu, 4 Feb 2021 12:35:26 +0100 (CET) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l7cuz-0005Oj-Ro; Thu, 04 Feb 2021 11:35:25 +0000 From: Christian Ehrhardt To: Olivier Matz Cc: Honnappa Nagarahalli , dpdk stable Date: Thu, 4 Feb 2021 12:28:21 +0100 Message-Id: <20210204112954.2488123-46-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> References: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' has been queued to stable release 19.11.7 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- >From 60e01fe034770aba98b182d6a9ff7ae8500e1983 Mon Sep 17 00:00:00 2001 From: Olivier Matz 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 Reviewed-by: Honnappa Nagarahalli --- 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.