patch 'ipc: trigger async callback without peers' has been queued to stable release 24.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 6 12:20:36 CEST 2026


Hi,

FYI, your patch has been queued to stable release 24.11.7

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

Thanks.

Luca Boccassi

---
>From a1697c73725744499eb101805cc9c4c9508f4754 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Fri, 26 Jun 2026 11:34:01 +0100
Subject: [PATCH] ipc: trigger async callback without peers

[ upstream commit 894bc93b6b464218d051f779ef0f4336ec812f09 ]

Currently, when rte_mp_request_async() is called and no peer processes
are connected (nb_sent == 0), the user callback is never invoked.

The original implementation used a dedicated background thread and
pthread_cond_signal() to wake it after queuing the dummy request. When
that thread was replaced with per-message alarms, no alarm was set for
the dummy request, silently breaking the nb_sent == 0 path.

This was not noticed because async requests are usually used while handling
secondary process requests, where peers are typically already present.

Fix it by setting a 1us alarm on the dummy request, so the callback path
immediately triggers and processes it.

Fixes: daf9bfca717e ("ipc: remove thread for async requests")

Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 lib/eal/common/eal_common_proc.c | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
index 32bac37b7f..d3494b7c1c 100644
--- a/lib/eal/common/eal_common_proc.c
+++ b/lib/eal/common/eal_common_proc.c
@@ -1174,11 +1174,21 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 		ret = mp_request_async(eal_mp_socket_path(), copy, param, ts);
 
-		/* if we didn't send anything, put dummy request on the queue */
+		/* if we didn't send anything, put dummy request on the queue
+		 * and set a minimum-delay alarm so the callback fires immediately.
+		 */
 		if (ret == 0 && reply->nb_sent == 0) {
-			TAILQ_INSERT_TAIL(&pending_requests.requests, dummy,
-					next);
+			TAILQ_INSERT_TAIL(&pending_requests.requests, dummy, next);
 			dummy_used = true;
+			if (rte_eal_alarm_set(1, async_reply_handle,
+					(void *)(uintptr_t)dummy->id) < 0) {
+				EAL_LOG(ERR, "Fail to set alarm for dummy request");
+				/* roll back the changes */
+				TAILQ_REMOVE(&pending_requests.requests, dummy, next);
+				dummy_used = false;
+				ret = -1;
+				goto unlock_fail;
+			}
 		}
 
 		pthread_mutex_unlock(&pending_requests.lock);
@@ -1242,10 +1252,22 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
 		reply->nb_sent = 0;
 	}
 
-	/* if we didn't send anything, put dummy request on the queue */
+	/* if we didn't send anything, put dummy request on the queue
+	 * and set a minimum-delay alarm so the callback fires immediately.
+	 */
 	if (ret == 0 && reply->nb_sent == 0) {
 		TAILQ_INSERT_HEAD(&pending_requests.requests, dummy, next);
 		dummy_used = true;
+
+		if (rte_eal_alarm_set(1, async_reply_handle,
+				(void *)(uintptr_t)dummy->id) < 0) {
+			EAL_LOG(ERR, "Fail to set alarm for dummy request");
+			/* roll back the changes */
+			TAILQ_REMOVE(&pending_requests.requests, dummy, next);
+			dummy_used = false;
+			ret = -1;
+			goto closedir_fail;
+		}
 	}
 
 	/* finally, unlock the queue */
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-03 12:55:48.361144614 +0100
+++ 0044-ipc-trigger-async-callback-without-peers.patch	2026-07-03 12:55:46.674574086 +0100
@@ -1 +1 @@
-From 894bc93b6b464218d051f779ef0f4336ec812f09 Mon Sep 17 00:00:00 2001
+From a1697c73725744499eb101805cc9c4c9508f4754 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 894bc93b6b464218d051f779ef0f4336ec812f09 ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -29 +30 @@
-index 63cfacc8d5..5133eaaa47 100644
+index 32bac37b7f..d3494b7c1c 100644
@@ -32 +33 @@
-@@ -1199,11 +1199,21 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
+@@ -1174,11 +1174,21 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
@@ -57 +58 @@
-@@ -1268,10 +1278,22 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
+@@ -1242,10 +1252,22 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,


More information about the stable mailing list