[dpdk-stable] patch 'test/distributor: fix spurious failure' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 3 19:27:02 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/aebd97adab85938aaf026639ffd1385294c94c22

Thanks.

Kevin.

---
>From aebd97adab85938aaf026639ffd1385294c94c22 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang at arm.com>
Date: Tue, 15 Oct 2019 17:28:26 +0800
Subject: [PATCH] test/distributor: fix spurious failure

[ upstream commit 0a82b96e36746608eee9f1f71e2258d9c0099575 ]

Sanity test could spuriously fail with reporting flush count error.
It was caused by worker stat coherent issue between distributor and
worker thread.
Fix this issue by using atomic operations to update worker stat.

Fixes: c3eabff124e6 ("distributor: add unit tests")

Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
Reviewed-by: Gavin Hu <gavin.hu at arm.com>
Acked-by: David Hunt <david.hunt at intel.com>
---
 test/test/test_distributor.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index d4996798d..6aa4e49e6 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -71,10 +71,12 @@ handle_work(void *arg)
 	num = rte_distributor_get_pkt(db, id, buf, buf, num);
 	while (!quit) {
-		worker_stats[id].handled_packets += num;
+		__atomic_fetch_add(&worker_stats[id].handled_packets, num,
+				__ATOMIC_RELAXED);
 		count += num;
 		num = rte_distributor_get_pkt(db, id,
 				buf, buf, num);
 	}
-	worker_stats[id].handled_packets += num;
+	__atomic_fetch_add(&worker_stats[id].handled_packets, num,
+			__ATOMIC_RELAXED);
 	count += num;
 	rte_distributor_return_pkt(db, id, buf, num);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.808326390 +0000
+++ 0053-test-distributor-fix-spurious-failure.patch	2019-12-03 17:29:51.776749412 +0000
@@ -1 +1 @@
-From 0a82b96e36746608eee9f1f71e2258d9c0099575 Mon Sep 17 00:00:00 2001
+From aebd97adab85938aaf026639ffd1385294c94c22 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0a82b96e36746608eee9f1f71e2258d9c0099575 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
- app/test/test_distributor.c | 6 ++++--
+ test/test/test_distributor.c | 6 ++++--
@@ -21,4 +22,4 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 7090b55f8..ba1f81cf8 100644
---- a/app/test/test_distributor.c
-+++ b/app/test/test_distributor.c
+diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
+index d4996798d..6aa4e49e6 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c



More information about the stable mailing list