patch 'ipc: fix multi-process disabling' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:05:03 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/aadf718d409af1c7675dc32a6cd07228408cadd4
Thanks.
Kevin
---
>From aadf718d409af1c7675dc32a6cd07228408cadd4 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Wed, 4 Nov 2026 18:07:57 +0100
Subject: [PATCH] ipc: fix multi-process disabling
[ upstream commit 68a4de6039a1a6dcc8b40c81ca24f839ca170b7a ]
IPC and hotplug operations checked --no-shconf incompatible option
but ignored the multi-process status changed by rte_mp_disable().
As a result, IPC was still attempted
and hotplug devargs remained subject to the IPC message size limit
even when secondary processes could no longer attach.
Change the multi-process status when --no-shconf is used,
also covering --in-memory,
so it becomes enough to check this status only.
Allow previously registered IPC actions to be unregistered
after multi-process has been disabled.
Fixes: 5c307ba2a5b1 ("eal: register non-EAL threads as lcores")
Fixes: d2fd16c8b003 ("eal: add multiprocess disable API")
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: David Marchand <david.marchand at redhat.com>
---
lib/eal/common/eal_common_dev.c | 27 +++++++++++----
lib/eal/common/eal_common_mcfg.c | 3 ++
lib/eal/common/eal_common_proc.c | 56 ++++++++++++--------------------
lib/eal/common/eal_private.h | 5 +++
lib/eal/windows/eal.c | 6 ++++
5 files changed, 56 insertions(+), 41 deletions(-)
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 77aded842e..462811d6dc 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -245,8 +245,12 @@ int
rte_dev_probe(const char *devargs)
{
+ bool do_mp = !eal_mp_is_disabled();
struct eal_dev_mp_req req;
struct rte_device *dev;
int ret;
+ if (!do_mp)
+ goto skip_mp_req;
+
if (strlen(devargs) >= EAL_DEV_MP_DEV_ARGS_MAX_LEN) {
EAL_LOG(ERR, "devargs truncated (len %zu, max %d)",
@@ -278,4 +282,5 @@ rte_dev_probe(const char *devargs)
/* attach a shared device from primary start from here: */
+skip_mp_req:
/* primary attach the new device itself. */
ret = local_dev_probe(devargs, &dev);
@@ -295,4 +300,7 @@ rte_dev_probe(const char *devargs)
}
+ if (!do_mp)
+ return 0;
+
/* primary send attach sync request to secondary. */
ret = eal_dev_hotplug_request_to_secondary(&req);
@@ -389,4 +397,5 @@ int
rte_dev_remove(struct rte_device *dev)
{
+ bool do_mp = !eal_mp_is_disabled();
struct eal_dev_mp_req req;
char *devargs;
@@ -398,4 +407,7 @@ rte_dev_remove(struct rte_device *dev)
}
+ if (!do_mp)
+ goto skip_mp_req;
+
ret = build_devargs(dev->bus->name, dev->name, "", &devargs);
if (ret != 0)
@@ -456,4 +468,5 @@ rte_dev_remove(struct rte_device *dev)
}
+skip_mp_req:
/* primary detach the device itself. */
ret = local_dev_remove(dev);
@@ -472,11 +485,13 @@ rte_dev_remove(struct rte_device *dev)
rollback:
- req.t = EAL_DEV_REQ_TYPE_DETACH_ROLLBACK;
+ if (do_mp) {
+ req.t = EAL_DEV_REQ_TYPE_DETACH_ROLLBACK;
- /* primary send rollback request to secondary. */
- if (eal_dev_hotplug_request_to_secondary(&req) != 0)
- EAL_LOG(WARNING,
- "Failed to rollback device detach on secondary."
- "Devices in secondary may not sync with primary");
+ /* primary send rollback request to secondary. */
+ if (eal_dev_hotplug_request_to_secondary(&req) != 0)
+ EAL_LOG(WARNING,
+ "Failed to rollback device detach on secondary."
+ "Devices in secondary may not sync with primary");
+ }
return ret;
diff --git a/lib/eal/common/eal_common_mcfg.c b/lib/eal/common/eal_common_mcfg.c
index 84ee3f3959..32f5f50015 100644
--- a/lib/eal/common/eal_common_mcfg.c
+++ b/lib/eal/common/eal_common_mcfg.c
@@ -3,4 +3,5 @@
*/
+#include <rte_eal.h>
#include <rte_eal_memconfig.h>
#include <rte_version.h>
@@ -67,4 +68,6 @@ eal_mcfg_update_from_internal(void)
mcfg->legacy_mem = internal_conf->legacy_mem;
mcfg->single_file_segments = internal_conf->single_file_segments;
+ if (internal_conf->no_shconf)
+ rte_mp_disable(); /* multi-process requires shared config */
/* record current DPDK version */
mcfg->version = RTE_VERSION;
diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
index d2aeafca5b..f76f3902ee 100644
--- a/lib/eal/common/eal_common_proc.c
+++ b/lib/eal/common/eal_common_proc.c
@@ -230,12 +230,10 @@ rte_mp_action_register(const char *name, rte_mp_t action)
{
struct action_entry *entry;
- const struct internal_config *internal_conf =
- eal_get_internal_configuration();
if (validate_action_name(name) != 0)
return -1;
- if (internal_conf->no_shconf) {
- EAL_LOG(DEBUG, "No shared files mode enabled, IPC is disabled");
+ if (eal_mp_is_disabled()) {
+ EAL_LOG(DEBUG, "Multi-process support is disabled");
rte_errno = ENOTSUP;
return -1;
@@ -267,15 +265,8 @@ rte_mp_action_unregister(const char *name)
{
struct action_entry *entry;
- const struct internal_config *internal_conf =
- eal_get_internal_configuration();
if (validate_action_name(name) != 0)
return;
- if (internal_conf->no_shconf) {
- EAL_LOG(DEBUG, "No shared files mode enabled, IPC is disabled");
- return;
- }
-
pthread_mutex_lock(&mp_mutex_action);
entry = find_action_entry_by_name(name);
@@ -649,12 +640,7 @@ rte_mp_channel_init(void)
char path[PATH_MAX];
int dir_fd;
- const struct internal_config *internal_conf =
- eal_get_internal_configuration();
- /* in no shared files mode, we do not have secondary processes support,
- * so no need to initialize IPC.
- */
- if (internal_conf->no_shconf) {
- EAL_LOG(DEBUG, "No shared files mode enabled, IPC will be disabled");
+ if (eal_mp_is_disabled()) {
+ EAL_LOG(DEBUG, "Multi-process support is disabled");
rte_errno = ENOTSUP;
return -1;
@@ -898,12 +884,9 @@ int
rte_mp_sendmsg(struct rte_mp_msg *msg)
{
- const struct internal_config *internal_conf =
- eal_get_internal_configuration();
-
if (check_input(msg) != 0)
return -1;
- if (internal_conf->no_shconf) {
- EAL_LOG(DEBUG, "No shared files mode enabled, IPC is disabled");
+ if (eal_mp_is_disabled()) {
+ EAL_LOG(DEBUG, "Multi-process support is disabled");
rte_errno = ENOTSUP;
return -1;
@@ -1059,6 +1042,4 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
struct dirent *ent;
struct timespec now, end;
- const struct internal_config *internal_conf =
- eal_get_internal_configuration();
EAL_LOG(DEBUG, "request: %s", req->name);
@@ -1071,6 +1052,6 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
goto end;
- if (internal_conf->no_shconf) {
- EAL_LOG(DEBUG, "No shared files mode enabled, IPC is disabled");
+ if (eal_mp_is_disabled()) {
+ EAL_LOG(DEBUG, "Multi-process support is disabled");
rte_errno = ENOTSUP;
return -1;
@@ -1163,6 +1144,4 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
struct timespec *end;
bool dummy_used = false;
- const struct internal_config *internal_conf =
- eal_get_internal_configuration();
EAL_LOG(DEBUG, "request: %s", req->name);
@@ -1171,6 +1150,6 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
return -1;
- if (internal_conf->no_shconf) {
- EAL_LOG(DEBUG, "No shared files mode enabled, IPC is disabled");
+ if (eal_mp_is_disabled()) {
+ EAL_LOG(DEBUG, "Multi-process support is disabled");
rte_errno = ENOTSUP;
return -1;
@@ -1358,6 +1337,4 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
{
EAL_LOG(DEBUG, "reply: %s", msg->name);
- const struct internal_config *internal_conf =
- eal_get_internal_configuration();
if (check_input(msg) != 0)
@@ -1370,6 +1347,6 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
}
- if (internal_conf->no_shconf) {
- EAL_LOG(DEBUG, "No shared files mode enabled, IPC is disabled");
+ if (eal_mp_is_disabled()) {
+ EAL_LOG(DEBUG, "Multi-process support is disabled");
return 0;
}
@@ -1418,2 +1395,11 @@ __rte_mp_enable(void)
return set_mp_status(MP_STATUS_ENABLED);
}
+
+bool
+eal_mp_is_disabled(void)
+{
+ struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;
+
+ return rte_atomic_load_explicit(&mcfg->mp_status,
+ rte_memory_order_relaxed) == MP_STATUS_DISABLED;
+}
diff --git a/lib/eal/common/eal_private.h b/lib/eal/common/eal_private.h
index 2b7a4fddbc..28ea9ebf19 100644
--- a/lib/eal/common/eal_private.h
+++ b/lib/eal/common/eal_private.h
@@ -743,4 +743,9 @@ eal_rand_init(void);
bool __rte_mp_enable(void);
+/**
+ * Check whether multi-process is disabled.
+ */
+bool eal_mp_is_disabled(void);
+
/**
* Init per-lcore info in current thread.
diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c
index 21fe7cb1d9..543356e8dc 100644
--- a/lib/eal/windows/eal.c
+++ b/lib/eal/windows/eal.c
@@ -83,4 +83,10 @@ rte_mp_disable(void)
}
+bool
+eal_mp_is_disabled(void)
+{
+ return true;
+}
+
static int
sync_func(void *arg __rte_unused)
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:49.850342623 +0000
+++ 0377-ipc-fix-multi-process-disabling.patch 2026-12-03 12:52:39.287260957 +0000
@@ -1 +1 @@
-From 68a4de6039a1a6dcc8b40c81ca24f839ca170b7a Mon Sep 17 00:00:00 2001
+From aadf718d409af1c7675dc32a6cd07228408cadd4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68a4de6039a1a6dcc8b40c81ca24f839ca170b7a ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
- lib/eal/common/eal_common_dev.c | 8 ++---
+ lib/eal/common/eal_common_dev.c | 27 +++++++++++----
@@ -31 +32 @@
- 5 files changed, 37 insertions(+), 41 deletions(-)
+ 5 files changed, 56 insertions(+), 41 deletions(-)
@@ -34 +35 @@
-index b43b0a4bb3..39d5745142 100644
+index 77aded842e..462811d6dc 100644
@@ -37 +38 @@
-@@ -268,7 +268,5 @@ int
+@@ -245,8 +245,12 @@ int
@@ -40,3 +40,0 @@
-- const struct internal_config *internal_conf =
-- eal_get_internal_configuration();
-- bool do_mp = internal_conf->no_shconf == 0;
@@ -46 +44,22 @@
-@@ -427,7 +425,5 @@ int
+ int ret;
+
++ if (!do_mp)
++ goto skip_mp_req;
++
+ if (strlen(devargs) >= EAL_DEV_MP_DEV_ARGS_MAX_LEN) {
+ EAL_LOG(ERR, "devargs truncated (len %zu, max %d)",
+@@ -278,4 +282,5 @@ rte_dev_probe(const char *devargs)
+ /* attach a shared device from primary start from here: */
+
++skip_mp_req:
+ /* primary attach the new device itself. */
+ ret = local_dev_probe(devargs, &dev);
+@@ -295,4 +300,7 @@ rte_dev_probe(const char *devargs)
+ }
+
++ if (!do_mp)
++ return 0;
++
+ /* primary send attach sync request to secondary. */
+ ret = eal_dev_hotplug_request_to_secondary(&req);
+@@ -389,4 +397,5 @@ int
@@ -49,3 +67,0 @@
-- const struct internal_config *internal_conf =
-- eal_get_internal_configuration();
-- bool do_mp = internal_conf->no_shconf == 0;
@@ -54,0 +71,34 @@
+@@ -398,4 +407,7 @@ rte_dev_remove(struct rte_device *dev)
+ }
+
++ if (!do_mp)
++ goto skip_mp_req;
++
+ ret = build_devargs(dev->bus->name, dev->name, "", &devargs);
+ if (ret != 0)
+@@ -456,4 +468,5 @@ rte_dev_remove(struct rte_device *dev)
+ }
+
++skip_mp_req:
+ /* primary detach the device itself. */
+ ret = local_dev_remove(dev);
+@@ -472,11 +485,13 @@ rte_dev_remove(struct rte_device *dev)
+
+ rollback:
+- req.t = EAL_DEV_REQ_TYPE_DETACH_ROLLBACK;
++ if (do_mp) {
++ req.t = EAL_DEV_REQ_TYPE_DETACH_ROLLBACK;
+
+- /* primary send rollback request to secondary. */
+- if (eal_dev_hotplug_request_to_secondary(&req) != 0)
+- EAL_LOG(WARNING,
+- "Failed to rollback device detach on secondary."
+- "Devices in secondary may not sync with primary");
++ /* primary send rollback request to secondary. */
++ if (eal_dev_hotplug_request_to_secondary(&req) != 0)
++ EAL_LOG(WARNING,
++ "Failed to rollback device detach on secondary."
++ "Devices in secondary may not sync with primary");
++ }
+
+ return ret;
@@ -73 +123 @@
-index 73c6a53013..b70e9189a4 100644
+index d2aeafca5b..f76f3902ee 100644
@@ -76 +126 @@
-@@ -234,12 +234,10 @@ rte_mp_action_register(const char *name, rte_mp_t action)
+@@ -230,12 +230,10 @@ rte_mp_action_register(const char *name, rte_mp_t action)
@@ -91 +141 @@
-@@ -271,15 +269,8 @@ rte_mp_action_unregister(const char *name)
+@@ -267,15 +265,8 @@ rte_mp_action_unregister(const char *name)
@@ -107,2 +157,2 @@
-@@ -657,12 +648,7 @@ rte_mp_channel_init(void)
- char path[UNIX_PATH_MAX];
+@@ -649,12 +640,7 @@ rte_mp_channel_init(void)
+ char path[PATH_MAX];
@@ -122 +172 @@
-@@ -913,12 +899,9 @@ int
+@@ -898,12 +884,9 @@ int
@@ -137 +187 @@
-@@ -1074,6 +1057,4 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
+@@ -1059,6 +1042,4 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
@@ -144 +194 @@
-@@ -1086,6 +1067,6 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
+@@ -1071,6 +1052,6 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
@@ -153 +203 @@
-@@ -1183,6 +1164,4 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
+@@ -1163,6 +1144,4 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
@@ -160 +210 @@
-@@ -1191,6 +1170,6 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
+@@ -1171,6 +1150,6 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
@@ -169 +219 @@
-@@ -1379,6 +1358,4 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
+@@ -1358,6 +1337,4 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
@@ -176 +226 @@
-@@ -1391,6 +1368,6 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
+@@ -1370,6 +1347,6 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
@@ -185 +235 @@
-@@ -1439,2 +1416,11 @@ __rte_mp_enable(void)
+@@ -1418,2 +1395,11 @@ __rte_mp_enable(void)
@@ -198 +248 @@
-index 8905464f64..60441ac0f2 100644
+index 2b7a4fddbc..28ea9ebf19 100644
@@ -201 +251 @@
-@@ -742,4 +742,9 @@ eal_rand_init(void);
+@@ -743,4 +743,9 @@ eal_rand_init(void);
@@ -212 +262 @@
-index cac8faa53d..7309986910 100644
+index 21fe7cb1d9..543356e8dc 100644
@@ -215 +265 @@
-@@ -82,4 +82,10 @@ rte_mp_disable(void)
+@@ -83,4 +83,10 @@ rte_mp_disable(void)
More information about the stable
mailing list