[dpdk-stable] patch 'stack: reload head when pop fails' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:43:38 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.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 10/30/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 8e02b23f34dcda47d1ef7920315d7a162e2f6f79 Mon Sep 17 00:00:00 2001
From: Steven Lariau <steven.lariau at arm.com>
Date: Fri, 25 Sep 2020 18:43:38 +0100
Subject: [PATCH] stack: reload head when pop fails

[ upstream commit 18effad9cfa7ab077712c9d37672c3ae1bbf9213 ]

List head must be loaded right before continue (when failed to
find the new head).
Without this, one thread might keep trying and failing to pop items
without ever loading the new correct head.

Fixes: 7e6e609939a8 ("stack: add C11 atomic implementation")
Cc: gage.eads at intel.com

Signed-off-by: Steven Lariau <steven.lariau at arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Acked-by: Gage Eads <gage.eads at intel.com>
---
 lib/librte_stack/rte_stack_lf_c11.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_stack/rte_stack_lf_c11.h b/lib/librte_stack/rte_stack_lf_c11.h
index 999359f081..94129c3e8a 100644
--- a/lib/librte_stack/rte_stack_lf_c11.h
+++ b/lib/librte_stack/rte_stack_lf_c11.h
@@ -139,8 +139,10 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
 		/* If NULL was encountered, the list was modified while
 		 * traversing it. Retry.
 		 */
-		if (i != num)
+		if (i != num) {
+			old_head = list->head;
 			continue;
+		}
 
 		new_head.top = tmp;
 		new_head.cnt = old_head.cnt + 1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.611841151 +0000
+++ 0059-stack-reload-head-when-pop-fails.patch	2020-10-28 10:35:11.524830318 +0000
@@ -1,8 +1,10 @@
-From 18effad9cfa7ab077712c9d37672c3ae1bbf9213 Mon Sep 17 00:00:00 2001
+From 8e02b23f34dcda47d1ef7920315d7a162e2f6f79 Mon Sep 17 00:00:00 2001
 From: Steven Lariau <steven.lariau at arm.com>
 Date: Fri, 25 Sep 2020 18:43:38 +0100
 Subject: [PATCH] stack: reload head when pop fails
 
+[ upstream commit 18effad9cfa7ab077712c9d37672c3ae1bbf9213 ]
+
 List head must be loaded right before continue (when failed to
 find the new head).
 Without this, one thread might keep trying and failing to pop items
@@ -10,7 +12,6 @@
 
 Fixes: 7e6e609939a8 ("stack: add C11 atomic implementation")
 Cc: gage.eads at intel.com
-Cc: stable at dpdk.org
 
 Signed-off-by: Steven Lariau <steven.lariau at arm.com>
 Reviewed-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
@@ -21,10 +22,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_stack/rte_stack_lf_c11.h b/lib/librte_stack/rte_stack_lf_c11.h
-index 2bc6394194..adb9f590de 100644
+index 999359f081..94129c3e8a 100644
 --- a/lib/librte_stack/rte_stack_lf_c11.h
 +++ b/lib/librte_stack/rte_stack_lf_c11.h
-@@ -133,8 +133,10 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
+@@ -139,8 +139,10 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
  		/* If NULL was encountered, the list was modified while
  		 * traversing it. Retry.
  		 */


More information about the stable mailing list