[dpdk-stable] patch 'eal: initialize alarms early' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Thu Apr 25 17:40:11 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/01/19. 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 can be viewed on the 18.11 branch at:
	https://github.com/kevintraynor/dpdk-stable-queue.git

Thanks.

Kevin Traynor

---
>From bb5430fbb09c6ab37e187094bd2e64d250f2e101 Mon Sep 17 00:00:00 2001
From: Darek Stojaczyk <dariusz.stojaczyk at intel.com>
Date: Mon, 1 Apr 2019 16:18:14 +0200
Subject: [PATCH] eal: initialize alarms early

[ upstream commit ea4e3ab7bd37980f9745e1e63ac33390cc8bae10 ]

On Linux, we currently initialize rte_alarms after
starting to listen for IPC hotplug requests, which gives
us a data race window. Upon receiving such hotplug
request we always try to set an alarm and this obviously
doesn't work if the alarms weren't initialized yet.

To fix it, we initialize alarms before starting to
listen for IPC hotplug messages. Specifically, we move
rte_eal_alarm_init() right after rte_eal_intr_init() as
it makes some sense to keep those two close to each other.

We update the BSD code as well to keep the initialization
order the same in both EAL implementations.

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

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk at intel.com>
---
 lib/librte_eal/bsdapp/eal/eal.c   | 12 ++++++------
 lib/librte_eal/linuxapp/eal/eal.c | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
index f01495e33..26c31a236 100644
--- a/lib/librte_eal/bsdapp/eal/eal.c
+++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -663,4 +663,10 @@ rte_eal_init(int argc, char **argv)
 	}
 
+	if (rte_eal_alarm_init() < 0) {
+		rte_eal_init_alert("Cannot init interrupt-handling thread");
+		/* rte_eal_alarm_init sets rte_errno on failure. */
+		return -1;
+	}
+
 	/* Put mp channel init before bus scan so that we can init the vdev
 	 * bus through mp channel in the secondary process before the bus scan.
@@ -752,10 +758,4 @@ rte_eal_init(int argc, char **argv)
 	}
 
-	if (rte_eal_alarm_init() < 0) {
-		rte_eal_init_alert("Cannot init interrupt-handling thread");
-		/* rte_eal_alarm_init sets rte_errno on failure. */
-		return -1;
-	}
-
 	if (rte_eal_timer_init() < 0) {
 		rte_eal_init_alert("Cannot init HPET or TSC timers");
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 30138b638..479071260 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -1001,4 +1001,10 @@ rte_eal_init(int argc, char **argv)
 	}
 
+	if (rte_eal_alarm_init() < 0) {
+		rte_eal_init_alert("Cannot init interrupt-handling thread");
+		/* rte_eal_alarm_init sets rte_errno on failure. */
+		return -1;
+	}
+
 	/* Put mp channel init before bus scan so that we can init the vdev
 	 * bus through mp channel in the secondary process before the bus scan.
@@ -1121,10 +1127,4 @@ rte_eal_init(int argc, char **argv)
 	}
 
-	if (rte_eal_alarm_init() < 0) {
-		rte_eal_init_alert("Cannot init interrupt-handling thread");
-		/* rte_eal_alarm_init sets rte_errno on failure. */
-		return -1;
-	}
-
 	if (rte_eal_timer_init() < 0) {
 		rte_eal_init_alert("Cannot init HPET or TSC timers");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-25 16:37:48.308923416 +0100
+++ 0036-eal-initialize-alarms-early.patch	2019-04-25 16:37:46.746294926 +0100
@@ -1 +1 @@
-From ea4e3ab7bd37980f9745e1e63ac33390cc8bae10 Mon Sep 17 00:00:00 2001
+From bb5430fbb09c6ab37e187094bd2e64d250f2e101 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ea4e3ab7bd37980f9745e1e63ac33390cc8bae10 ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -25,2 +26,2 @@
- lib/librte_eal/freebsd/eal/eal.c | 12 ++++++------
- lib/librte_eal/linux/eal/eal.c   | 12 ++++++------
+ lib/librte_eal/bsdapp/eal/eal.c   | 12 ++++++------
+ lib/librte_eal/linuxapp/eal/eal.c | 12 ++++++------
@@ -29,4 +30,4 @@
-diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c
-index 4e86b10b1..790c6afa7 100644
---- a/lib/librte_eal/freebsd/eal/eal.c
-+++ b/lib/librte_eal/freebsd/eal/eal.c
+diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
+index f01495e33..26c31a236 100644
+--- a/lib/librte_eal/bsdapp/eal/eal.c
++++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -55,5 +56,5 @@
-diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
-index 13f401684..75ed0cf10 100644
---- a/lib/librte_eal/linux/eal/eal.c
-+++ b/lib/librte_eal/linux/eal/eal.c
-@@ -1006,4 +1006,10 @@ rte_eal_init(int argc, char **argv)
+diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
+index 30138b638..479071260 100644
+--- a/lib/librte_eal/linuxapp/eal/eal.c
++++ b/lib/librte_eal/linuxapp/eal/eal.c
+@@ -1001,4 +1001,10 @@ rte_eal_init(int argc, char **argv)
@@ -70 +71 @@
-@@ -1126,10 +1132,4 @@ rte_eal_init(int argc, char **argv)
+@@ -1121,10 +1127,4 @@ rte_eal_init(int argc, char **argv)


More information about the stable mailing list