[dpdk-stable] patch 'eal/linux: fix return after alarm registration failure' has been queued to LTS release 18.11.3

Kevin Traynor ktraynor at redhat.com
Fri Aug 23 11:42:54 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.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 08/28/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 are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/6f4a16e42610878c498b24af79826bd4580d1a00

Thanks.

Kevin Traynor

---
>From 6f4a16e42610878c498b24af79826bd4580d1a00 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Wed, 26 Jun 2019 12:12:00 +0200
Subject: [PATCH] eal/linux: fix return after alarm registration failure

[ upstream commit 75683290e5ed7846b3e37d927efca68974fb3f20 ]

When adding an alarm, if an error happen when registering
the common alarm callback, it is not considered as a major failure.
The alarm is then inserted in the list.
However it was returning an error code after inserting the alarm.

The error code is not set anymore to be consistent with the behaviour.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 lib/librte_eal/linuxapp/eal/eal_alarm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_alarm.c b/lib/librte_eal/linuxapp/eal/eal_alarm.c
index 840ede780..0924c9205 100644
--- a/lib/librte_eal/linuxapp/eal/eal_alarm.c
+++ b/lib/librte_eal/linuxapp/eal/eal_alarm.c
@@ -138,7 +138,8 @@ rte_eal_alarm_set(uint64_t us, rte_eal_alarm_callback cb_fn, void *cb_arg)
 	rte_spinlock_lock(&alarm_list_lk);
 	if (!handler_registered) {
-		ret |= rte_intr_callback_register(&intr_handle,
-				eal_alarm_callback, NULL);
-		handler_registered = (ret == 0) ? 1 : 0;
+		/* registration can fail, callback can be registered later */
+		if (rte_intr_callback_register(&intr_handle,
+				eal_alarm_callback, NULL) == 0)
+			handler_registered = 1;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-08-22 19:38:20.730451971 +0100
+++ 0004-eal-linux-fix-return-after-alarm-registration-failur.patch	2019-08-22 19:38:20.395027881 +0100
@@ -1 +1 @@
-From 75683290e5ed7846b3e37d927efca68974fb3f20 Mon Sep 17 00:00:00 2001
+From 6f4a16e42610878c498b24af79826bd4580d1a00 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75683290e5ed7846b3e37d927efca68974fb3f20 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
- lib/librte_eal/linux/eal/eal_alarm.c | 7 ++++---
+ lib/librte_eal/linuxapp/eal/eal_alarm.c | 7 ++++---
@@ -23 +24 @@
-diff --git a/lib/librte_eal/linux/eal/eal_alarm.c b/lib/librte_eal/linux/eal/eal_alarm.c
+diff --git a/lib/librte_eal/linuxapp/eal/eal_alarm.c b/lib/librte_eal/linuxapp/eal/eal_alarm.c
@@ -25,2 +26,2 @@
---- a/lib/librte_eal/linux/eal/eal_alarm.c
-+++ b/lib/librte_eal/linux/eal/eal_alarm.c
+--- a/lib/librte_eal/linuxapp/eal/eal_alarm.c
++++ b/lib/librte_eal/linuxapp/eal/eal_alarm.c


More information about the stable mailing list