[dpdk-stable] patch 'eal: reset lcore task callback and argument' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:31:16 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/6c7884c1caced1127482c07596f113253bada945

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 6c7884c1caced1127482c07596f113253bada945 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Date: Sun, 24 Oct 2021 23:52:34 -0500
Subject: [PATCH] eal: reset lcore task callback and argument
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 33969e9c61385fc397f1934324e231ece9750404 ]

In the rte_eal_remote_launch function, the lcore function
pointer is checked for NULL. However, the pointer is never
reset to NULL. Reset the lcore function pointer and argument
after the worker has completed executing the lcore function.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Reviewed-by: Feifei Wang <feifei.wang2 at arm.com>
---
 lib/librte_eal/freebsd/eal_thread.c | 2 ++
 lib/librte_eal/linux/eal_thread.c   | 2 ++
 lib/librte_eal/windows/eal_thread.c | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/lib/librte_eal/freebsd/eal_thread.c b/lib/librte_eal/freebsd/eal_thread.c
index 1dce9b04f2..bbc3a8e985 100644
--- a/lib/librte_eal/freebsd/eal_thread.c
+++ b/lib/librte_eal/freebsd/eal_thread.c
@@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg)
 		fct_arg = lcore_config[lcore_id].arg;
 		ret = lcore_config[lcore_id].f(fct_arg);
 		lcore_config[lcore_id].ret = ret;
+		lcore_config[lcore_id].f = NULL;
+		lcore_config[lcore_id].arg = NULL;
 		rte_wmb();
 		lcore_config[lcore_id].state = FINISHED;
 	}
diff --git a/lib/librte_eal/linux/eal_thread.c b/lib/librte_eal/linux/eal_thread.c
index 83c2034b93..8f3c0dafd6 100644
--- a/lib/librte_eal/linux/eal_thread.c
+++ b/lib/librte_eal/linux/eal_thread.c
@@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg)
 		fct_arg = lcore_config[lcore_id].arg;
 		ret = lcore_config[lcore_id].f(fct_arg);
 		lcore_config[lcore_id].ret = ret;
+		lcore_config[lcore_id].f = NULL;
+		lcore_config[lcore_id].arg = NULL;
 		rte_wmb();
 
 		/* when a service core returns, it should go directly to WAIT
diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c
index 9c3f6d69fd..df1df5d02c 100644
--- a/lib/librte_eal/windows/eal_thread.c
+++ b/lib/librte_eal/windows/eal_thread.c
@@ -110,6 +110,8 @@ eal_thread_loop(void *arg __rte_unused)
 		fct_arg = lcore_config[lcore_id].arg;
 		ret = lcore_config[lcore_id].f(fct_arg);
 		lcore_config[lcore_id].ret = ret;
+		lcore_config[lcore_id].f = NULL;
+		lcore_config[lcore_id].arg = NULL;
 		rte_wmb();
 
 		/* when a service core returns, it should go directly to WAIT
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.435509806 +0800
+++ 0192-eal-reset-lcore-task-callback-and-argument.patch	2021-11-10 14:17:02.000745027 +0800
@@ -1 +1 @@
-From 33969e9c61385fc397f1934324e231ece9750404 Mon Sep 17 00:00:00 2001
+From 6c7884c1caced1127482c07596f113253bada945 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 33969e9c61385fc397f1934324e231ece9750404 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -18,3 +20,3 @@
- lib/eal/freebsd/eal_thread.c | 2 ++
- lib/eal/linux/eal_thread.c   | 2 ++
- lib/eal/windows/eal_thread.c | 2 ++
+ lib/librte_eal/freebsd/eal_thread.c | 2 ++
+ lib/librte_eal/linux/eal_thread.c   | 2 ++
+ lib/librte_eal/windows/eal_thread.c | 2 ++
@@ -23 +25 @@
-diff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c
+diff --git a/lib/librte_eal/freebsd/eal_thread.c b/lib/librte_eal/freebsd/eal_thread.c
@@ -25,2 +27,2 @@
---- a/lib/eal/freebsd/eal_thread.c
-+++ b/lib/eal/freebsd/eal_thread.c
+--- a/lib/librte_eal/freebsd/eal_thread.c
++++ b/lib/librte_eal/freebsd/eal_thread.c
@@ -36 +38 @@
-diff --git a/lib/eal/linux/eal_thread.c b/lib/eal/linux/eal_thread.c
+diff --git a/lib/librte_eal/linux/eal_thread.c b/lib/librte_eal/linux/eal_thread.c
@@ -38,2 +40,2 @@
---- a/lib/eal/linux/eal_thread.c
-+++ b/lib/eal/linux/eal_thread.c
+--- a/lib/librte_eal/linux/eal_thread.c
++++ b/lib/librte_eal/linux/eal_thread.c
@@ -49 +51 @@
-diff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c
+diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c
@@ -51,2 +53,2 @@
---- a/lib/eal/windows/eal_thread.c
-+++ b/lib/eal/windows/eal_thread.c
+--- a/lib/librte_eal/windows/eal_thread.c
++++ b/lib/librte_eal/windows/eal_thread.c


More information about the stable mailing list