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

Xueming Li xuemingl at nvidia.com
Sun Jun 25 08:34:02 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=f4d5f30fe439f2c316f2c51b5cdd9bb081b9639a

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From f4d5f30fe439f2c316f2c51b5cdd9bb081b9639a 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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/eal/linux/eal.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 7b0eafd565..336698379f 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1056,12 +1056,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;
@@ -1206,6 +1200,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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.181039600 +0800
+++ 0024-eal-linux-fix-secondary-process-crash-for-mp-hotplug.patch	2023-06-25 14:31:58.305773900 +0800
@@ -1 +1 @@
-From 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 Mon Sep 17 00:00:00 2001
+From f4d5f30fe439f2c316f2c51b5cdd9bb081b9639a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 90e05fe4de..99b0a59706 100644
+index 7b0eafd565..336698379f 100644
@@ -24 +26 @@
-@@ -1058,12 +1058,6 @@ rte_eal_init(int argc, char **argv)
+@@ -1056,12 +1056,6 @@ rte_eal_init(int argc, char **argv)
@@ -37 +39 @@
-@@ -1221,6 +1215,12 @@ rte_eal_init(int argc, char **argv)
+@@ -1206,6 +1200,12 @@ rte_eal_init(int argc, char **argv)


More information about the stable mailing list