patch 'eal: reset lcore task callback and argument' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:35:05 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/7cc60830205def25283b1be27ae5ab0f7dc6a8e6

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 7cc60830205def25283b1be27ae5ab0f7dc6a8e6 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

[ 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/eal_thread.c | 2 ++
 lib/librte_eal/linux/eal/eal_thread.c   | 2 ++
 lib/librte_eal/windows/eal/eal_thread.c | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/lib/librte_eal/freebsd/eal/eal_thread.c b/lib/librte_eal/freebsd/eal/eal_thread.c
index 309b587266..76992e2164 100644
--- a/lib/librte_eal/freebsd/eal/eal_thread.c
+++ b/lib/librte_eal/freebsd/eal/eal_thread.c
@@ -152,6 +152,8 @@ eal_thread_loop(__attribute__((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/eal_thread.c b/lib/librte_eal/linux/eal/eal_thread.c
index 379773b683..4f7d97a0d2 100644
--- a/lib/librte_eal/linux/eal/eal_thread.c
+++ b/lib/librte_eal/linux/eal/eal_thread.c
@@ -152,6 +152,8 @@ eal_thread_loop(__attribute__((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/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c
index af1e7fe2ea..90797edb6d 100644
--- a/lib/librte_eal/windows/eal/eal_thread.c
+++ b/lib/librte_eal/windows/eal/eal_thread.c
@@ -124,6 +124,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.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:11.706181823 +0100
+++ 0101-eal-reset-lcore-task-callback-and-argument.patch	2021-11-30 16:50:05.902874352 +0100
@@ -1 +1 @@
-From 33969e9c61385fc397f1934324e231ece9750404 Mon Sep 17 00:00:00 2001
+From 7cc60830205def25283b1be27ae5ab0f7dc6a8e6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 33969e9c61385fc397f1934324e231ece9750404 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -18,3 +19,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/eal_thread.c | 2 ++
+ lib/librte_eal/linux/eal/eal_thread.c   | 2 ++
+ lib/librte_eal/windows/eal/eal_thread.c | 2 ++
@@ -23,5 +24,5 @@
-diff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c
-index 1dce9b04f2..bbc3a8e985 100644
---- a/lib/eal/freebsd/eal_thread.c
-+++ b/lib/eal/freebsd/eal_thread.c
-@@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg)
+diff --git a/lib/librte_eal/freebsd/eal/eal_thread.c b/lib/librte_eal/freebsd/eal/eal_thread.c
+index 309b587266..76992e2164 100644
+--- a/lib/librte_eal/freebsd/eal/eal_thread.c
++++ b/lib/librte_eal/freebsd/eal/eal_thread.c
+@@ -152,6 +152,8 @@ eal_thread_loop(__attribute__((unused)) void *arg)
@@ -36,5 +37,5 @@
-diff --git a/lib/eal/linux/eal_thread.c b/lib/eal/linux/eal_thread.c
-index 83c2034b93..8f3c0dafd6 100644
---- a/lib/eal/linux/eal_thread.c
-+++ b/lib/eal/linux/eal_thread.c
-@@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg)
+diff --git a/lib/librte_eal/linux/eal/eal_thread.c b/lib/librte_eal/linux/eal/eal_thread.c
+index 379773b683..4f7d97a0d2 100644
+--- a/lib/librte_eal/linux/eal/eal_thread.c
++++ b/lib/librte_eal/linux/eal/eal_thread.c
+@@ -152,6 +152,8 @@ eal_thread_loop(__attribute__((unused)) void *arg)
@@ -49,5 +50,5 @@
-diff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c
-index 9c3f6d69fd..df1df5d02c 100644
---- a/lib/eal/windows/eal_thread.c
-+++ b/lib/eal/windows/eal_thread.c
-@@ -110,6 +110,8 @@ eal_thread_loop(void *arg __rte_unused)
+diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c
+index af1e7fe2ea..90797edb6d 100644
+--- a/lib/librte_eal/windows/eal/eal_thread.c
++++ b/lib/librte_eal/windows/eal/eal_thread.c
+@@ -124,6 +124,8 @@ eal_thread_loop(void *arg __rte_unused)


More information about the stable mailing list