[dpdk-stable] patch 'stack: fix reload head when pop fails' has been queued to stable release 20.11.4
Xueming Li
xuemingl at nvidia.com
Wed Nov 10 07:29:12 CET 2021
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e78d085e36db1df8a90bb3e87fdeca69bd4b85a4
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From e78d085e36db1df8a90bb3e87fdeca69bd4b85a4 Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier at nokia.com>
Date: Tue, 21 Sep 2021 18:17:24 +0200
Subject: [PATCH] stack: fix reload head when pop fails
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 6ded44bce4d3e5f4fce66f00ce0638ebc866911f ]
The previous commit 18effad9cfa7 ("stack: reload head when pop fails")
only changed C11 implementation, not generic implementation.
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: 3340202f5954 ("stack: add lock-free implementation")
Signed-off-by: Julien Meunier <julien.meunier at nokia.com>
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
---
lib/librte_stack/rte_stack_lf_generic.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h
index 4850a05ee7..7fa29cedb2 100644
--- a/lib/librte_stack/rte_stack_lf_generic.h
+++ b/lib/librte_stack/rte_stack_lf_generic.h
@@ -128,8 +128,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.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.100432366 +0800
+++ 0068-stack-fix-reload-head-when-pop-fails.patch 2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From 6ded44bce4d3e5f4fce66f00ce0638ebc866911f Mon Sep 17 00:00:00 2001
+From e78d085e36db1df8a90bb3e87fdeca69bd4b85a4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6ded44bce4d3e5f4fce66f00ce0638ebc866911f ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
- lib/stack/rte_stack_lf_generic.h | 4 +++-
+ lib/librte_stack/rte_stack_lf_generic.h | 4 +++-
@@ -22 +24 @@
-diff --git a/lib/stack/rte_stack_lf_generic.h b/lib/stack/rte_stack_lf_generic.h
+diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h
@@ -24,2 +26,2 @@
---- a/lib/stack/rte_stack_lf_generic.h
-+++ b/lib/stack/rte_stack_lf_generic.h
+--- a/lib/librte_stack/rte_stack_lf_generic.h
++++ b/lib/librte_stack/rte_stack_lf_generic.h
More information about the stable
mailing list