patch 'ipc: fix multi-process disabling' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Nov 16 23:51:30 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/18/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/9c01fb071a4759bbb9eeaa8fc28fc636ea65117f
Thanks.
Luca Boccassi
---
>From 9c01fb071a4759bbb9eeaa8fc28fc636ea65117f 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 | 26 +++++++++++----
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, 55 insertions(+), 41 deletions(-)
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 54f90af4b6..9df0df2de5 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -233,10 +233,13 @@ err_devarg:
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)",
@@ -267,6 +270,7 @@ 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);
@@ -284,6 +288,9 @@ rte_dev_probe(const char *devargs)
return ret;
}
+ if (!do_mp)
+ return 0;
+
/* primary send attach sync request to secondary. */
ret = eal_dev_hotplug_request_to_secondary(&req);
@@ -376,6 +383,7 @@ local_dev_remove(struct rte_device *dev)
int
rte_dev_remove(struct rte_device *dev)
{
+ bool do_mp = !eal_mp_is_disabled();
struct eal_dev_mp_req req;
char *devargs;
int ret;
@@ -385,6 +393,9 @@ rte_dev_remove(struct rte_device *dev)
return -ENOENT;
}
+ if (!do_mp)
+ goto skip_mp_req;
+
ret = build_devargs(dev->bus->name, dev->name, "", &devargs);
if (ret != 0)
return ret;
@@ -443,6 +454,7 @@ rte_dev_remove(struct rte_device *dev)
goto rollback;
}
+skip_mp_req:
/* primary detach the device itself. */
ret = local_dev_remove(dev);
@@ -459,13 +471,15 @@ rte_dev_remove(struct rte_device *dev)
return 0;
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 dabb80eaf5..5e88f75237 100644
--- a/lib/eal/common/eal_common_mcfg.c
+++ b/lib/eal/common/eal_common_mcfg.c
@@ -2,6 +2,7 @@
* Copyright(c) 2019 Intel Corporation
*/
+#include <rte_eal.h>
#include <rte_eal_memconfig.h>
#include <rte_version.h>
@@ -65,6 +66,8 @@ 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 816d66397e..45846e318d 100644
--- a/lib/eal/common/eal_common_proc.c
+++ b/lib/eal/common/eal_common_proc.c
@@ -226,14 +226,12 @@ int
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;
}
@@ -262,17 +260,10 @@ void
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);
if (entry == NULL) {
@@ -644,14 +635,9 @@ 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;
}
@@ -894,14 +880,11 @@ check_input(const struct rte_mp_msg *msg)
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;
}
@@ -1054,8 +1037,6 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
DIR *mp_dir;
struct dirent *ent;
struct timespec now, end;
- const struct internal_config *internal_conf =
- eal_get_internal_configuration();
EAL_LOG(DEBUG, "request: %s", req->name);
@@ -1066,8 +1047,8 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
if (check_input(req) != 0)
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;
}
@@ -1157,16 +1138,14 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
struct timespec now;
struct timespec *end;
bool dummy_used = false;
- const struct internal_config *internal_conf =
- eal_get_internal_configuration();
EAL_LOG(DEBUG, "request: %s", req->name);
if (check_input(req) != 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;
}
@@ -1351,8 +1330,6 @@ int
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)
return -1;
@@ -1363,8 +1340,8 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
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");
return 0;
}
@@ -1410,3 +1387,12 @@ __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 4328718018..cf0ab43618 100644
--- a/lib/eal/common/eal_private.h
+++ b/lib/eal/common/eal_private.h
@@ -713,6 +713,11 @@ 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 eb9fc302de..8a95bce1a8 100644
--- a/lib/eal/windows/eal.c
+++ b/lib/eal/windows/eal.c
@@ -80,6 +80,12 @@ rte_mp_disable(void)
return true;
}
+bool
+eal_mp_is_disabled(void)
+{
+ return true;
+}
+
/* display usage */
static void
eal_usage(const char *prgname)
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-11-16 22:52:17.162437601 +0000
+++ 0016-ipc-fix-multi-process-disabling.patch 2026-11-16 22:52:16.428231895 +0000
@@ -1 +1 @@
-From 68a4de6039a1a6dcc8b40c81ca24f839ca170b7a Mon Sep 17 00:00:00 2001
+From 9c01fb071a4759bbb9eeaa8fc28fc636ea65117f 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 | 26 +++++++++++----
@@ -31 +32 @@
- 5 files changed, 37 insertions(+), 41 deletions(-)
+ 5 files changed, 55 insertions(+), 41 deletions(-)
@@ -34 +35 @@
-index b43b0a4bb38..39d5745142c 100644
+index 54f90af4b6..9df0df2de5 100644
@@ -37 +38 @@
-@@ -267,9 +267,7 @@ RTE_EXPORT_SYMBOL(rte_dev_probe)
+@@ -233,10 +233,13 @@ err_devarg:
@@ -41,3 +41,0 @@
-- const struct internal_config *internal_conf =
-- eal_get_internal_configuration();
-- bool do_mp = internal_conf->no_shconf == 0;
@@ -48 +46,25 @@
-@@ -426,9 +424,7 @@ RTE_EXPORT_SYMBOL(rte_dev_remove)
+
++ 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)",
+@@ -267,6 +270,7 @@ 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);
+
+@@ -284,6 +288,9 @@ rte_dev_probe(const char *devargs)
+ return ret;
+ }
+
++ if (!do_mp)
++ return 0;
++
+ /* primary send attach sync request to secondary. */
+ ret = eal_dev_hotplug_request_to_secondary(&req);
+
+@@ -376,6 +383,7 @@ local_dev_remove(struct rte_device *dev)
@@ -52,3 +73,0 @@
-- const struct internal_config *internal_conf =
-- eal_get_internal_configuration();
-- bool do_mp = internal_conf->no_shconf == 0;
@@ -58,0 +78,40 @@
+@@ -385,6 +393,9 @@ rte_dev_remove(struct rte_device *dev)
+ return -ENOENT;
+ }
+
++ if (!do_mp)
++ goto skip_mp_req;
++
+ ret = build_devargs(dev->bus->name, dev->name, "", &devargs);
+ if (ret != 0)
+ return ret;
+@@ -443,6 +454,7 @@ rte_dev_remove(struct rte_device *dev)
+ goto rollback;
+ }
+
++skip_mp_req:
+ /* primary detach the device itself. */
+ ret = local_dev_remove(dev);
+
+@@ -459,13 +471,15 @@ rte_dev_remove(struct rte_device *dev)
+ return 0;
+
+ 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;
+ }
@@ -60 +119 @@
-index 84ee3f3959a..32f5f50015b 100644
+index dabb80eaf5..5e88f75237 100644
@@ -71 +130 @@
-@@ -66,6 +67,8 @@ eal_mcfg_update_from_internal(void)
+@@ -65,6 +66,8 @@ eal_mcfg_update_from_internal(void)
@@ -81 +140 @@
-index 73c6a530134..b70e9189a43 100644
+index 816d66397e..45846e318d 100644
@@ -84 +143 @@
-@@ -233,14 +233,12 @@ int
+@@ -226,14 +226,12 @@ int
@@ -101 +160 @@
-@@ -270,17 +268,10 @@ void
+@@ -262,17 +260,10 @@ void
@@ -119 +178 @@
-@@ -656,14 +647,9 @@ rte_mp_channel_init(void)
+@@ -644,14 +635,9 @@ rte_mp_channel_init(void)
@@ -121 +180 @@
- char path[UNIX_PATH_MAX];
+ char path[PATH_MAX];
@@ -136 +195 @@
-@@ -912,14 +898,11 @@ RTE_EXPORT_SYMBOL(rte_mp_sendmsg)
+@@ -894,14 +880,11 @@ check_input(const struct rte_mp_msg *msg)
@@ -153 +212 @@
-@@ -1073,8 +1056,6 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
+@@ -1054,8 +1037,6 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
@@ -162 +221 @@
-@@ -1085,8 +1066,8 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
+@@ -1066,8 +1047,8 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
@@ -173 +232 @@
-@@ -1182,16 +1163,14 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
+@@ -1157,16 +1138,14 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
@@ -192 +251 @@
-@@ -1378,8 +1357,6 @@ int
+@@ -1351,8 +1330,6 @@ int
@@ -201 +260 @@
-@@ -1390,8 +1367,8 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
+@@ -1363,8 +1340,8 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
@@ -212 +271 @@
-@@ -1438,3 +1415,12 @@ __rte_mp_enable(void)
+@@ -1410,3 +1387,12 @@ __rte_mp_enable(void)
@@ -226 +285 @@
-index 8905464f64d..60441ac0f23 100644
+index 4328718018..cf0ab43618 100644
@@ -229 +288 @@
-@@ -741,6 +741,11 @@ eal_rand_init(void);
+@@ -713,6 +713,11 @@ eal_rand_init(void);
@@ -242 +301 @@
-index cac8faa53db..73099869109 100644
+index eb9fc302de..8a95bce1a8 100644
@@ -245 +304 @@
-@@ -81,6 +81,12 @@ rte_mp_disable(void)
+@@ -80,6 +80,12 @@ rte_mp_disable(void)
@@ -255,3 +314,3 @@
- static int
- sync_func(void *arg __rte_unused)
- {
+ /* display usage */
+ static void
+ eal_usage(const char *prgname)
More information about the stable
mailing list