patch 'test/atomic: fix 128-bit atomic test with many cores' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:34:31 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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/c43649313a202a7b8d4fc10f12ffe5db2246d34f

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From c43649313a202a7b8d4fc10f12ffe5db2246d34f Mon Sep 17 00:00:00 2001
From: David Christensen <drc at linux.vnet.ibm.com>
Date: Wed, 8 Sep 2021 10:48:20 -0700
Subject: [PATCH] test/atomic: fix 128-bit atomic test with many cores

[ upstream commit 17a042376be17f6c615b93b189a53eaca1b8bd48 ]

When checking the results of the rte_atomic128_cmp_exchange() function,
current code compares the values of a uint32_t and a uint64_t variable.
If the number of lcores used by the test is large, or the value of the
iteration count N is increased, the variable size mismatch can cause a
false test failure.  Modify the comparison to compare uint64_t values.

Fixes: fa3253c534b1 ("test/atomic: add 128-bit atomic compare exchange test")

Signed-off-by: David Christensen <drc at linux.vnet.ibm.com>
Tested-by: Ruifeng Wang <ruifeng.wang at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
---
 app/test/test_atomic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c
index de3030d221..91ee29c004 100644
--- a/app/test/test_atomic.c
+++ b/app/test/test_atomic.c
@@ -591,7 +591,7 @@ test_atomic(void)
 	rte_atomic32_clear(&synchro);
 
 	iterations = count128.val[0] - count128.val[1];
-	if (iterations != 4*N*(rte_lcore_count()-1)) {
+	if (iterations != (uint64_t)4*N*(rte_lcore_count()-1)) {
 		printf("128-bit compare and swap failed\n");
 		return -1;
 	}
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:09.844791658 +0100
+++ 0067-test-atomic-fix-128-bit-atomic-test-with-many-cores.patch	2021-11-30 16:50:05.738873149 +0100
@@ -1 +1 @@
-From 17a042376be17f6c615b93b189a53eaca1b8bd48 Mon Sep 17 00:00:00 2001
+From c43649313a202a7b8d4fc10f12ffe5db2246d34f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 17a042376be17f6c615b93b189a53eaca1b8bd48 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index f10f555af8..ce0c259bd7 100644
+index de3030d221..91ee29c004 100644


More information about the stable mailing list