patch 'eal/linux: fix secondary process crash for mp hotplug' has been queued to stable release 20.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Jun 15 03:32:13 CEST 2023


Hi,

FYI, your patch has been queued to stable release 20.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/17/23. 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/39aa5011a932fb0049c015ea447269af695246af

Thanks.

Luca Boccassi

---
>From 39aa5011a932fb0049c015ea447269af695246af Mon Sep 17 00:00:00 2001
From: Zhihong Wang <wangzhihong.wzh at bytedance.com>
Date: Thu, 8 Jun 2023 15:25:53 +0800
Subject: [PATCH] eal/linux: fix secondary process crash for mp hotplug
 requests

[ upstream commit 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 ]

Secondary would crash if it tries to handle mp requests before memory
init, since globals such as eth_dev_shared_data_lock are not accessible
to it at this moment.

Fixes: 244d5130719c ("eal: enable hotplug on multi-process")

Signed-off-by: Zhihong Wang <wangzhihong.wzh at bytedance.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 lib/librte_eal/linux/eal.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 04942854a3..30dbdda38e 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -1058,12 +1058,6 @@ rte_eal_init(int argc, char **argv)
 		}
 	}
 
-	/* register multi-process action callbacks for hotplug */
-	if (eal_mp_dev_hotplug_init() < 0) {
-		rte_eal_init_alert("failed to register mp callback for hotplug");
-		return -1;
-	}
-
 	if (rte_bus_scan()) {
 		rte_eal_init_alert("Cannot scan the buses for devices");
 		rte_errno = ENODEV;
@@ -1202,6 +1196,12 @@ rte_eal_init(int argc, char **argv)
 		return -1;
 	}
 
+	/* register multi-process action callbacks for hotplug after memory init */
+	if (eal_mp_dev_hotplug_init() < 0) {
+		rte_eal_init_alert("failed to register mp callback for hotplug");
+		return -1;
+	}
+
 	if (rte_eal_tailqs_init() < 0) {
 		rte_eal_init_alert("Cannot init tail queues for objects");
 		rte_errno = EFAULT;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-15 01:56:35.711215787 +0100
+++ 0018-eal-linux-fix-secondary-process-crash-for-mp-hotplug.patch	2023-06-15 01:56:34.535540604 +0100
@@ -1 +1 @@
-From 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 Mon Sep 17 00:00:00 2001
+From 39aa5011a932fb0049c015ea447269af695246af Mon Sep 17 00:00:00 2001
@@ -6,0 +7,2 @@
+[ upstream commit 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -17 +18 @@
- lib/eal/linux/eal.c | 12 ++++++------
+ lib/librte_eal/linux/eal.c | 12 ++++++------
@@ -20,4 +21,4 @@
-diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
-index 90e05fe4de..99b0a59706 100644
---- a/lib/eal/linux/eal.c
-+++ b/lib/eal/linux/eal.c
+diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
+index 04942854a3..30dbdda38e 100644
+--- a/lib/librte_eal/linux/eal.c
++++ b/lib/librte_eal/linux/eal.c
@@ -37 +38 @@
-@@ -1221,6 +1215,12 @@ rte_eal_init(int argc, char **argv)
+@@ -1202,6 +1196,12 @@ rte_eal_init(int argc, char **argv)


More information about the stable mailing list