[PATCH] eal: clean runtime directory files on exit
Mounika Kalamandala
mounikax.kalamandala at intel.com
Fri Mar 6 07:08:22 CET 2026
Add cleanup of EAL runtime directory artifacts during rte_eal_cleanup().
This removes runtime files created during initialization and ensures
that no stale files remain under /var/run/dpdk/<file-prefix> after the
application terminates.
Update the documentation in multi_proc_support.rst to describe the
secondary process lifetime requirement when the primary process exits.
Signed-off-by: Mounika Kalamandala <mounikax.kalamandala at intel.com>
---
doc/guides/prog_guide/multi_proc_support.rst | 11 ++++++++++-
lib/eal/linux/eal.c | 4 ++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/doc/guides/prog_guide/multi_proc_support.rst b/doc/guides/prog_guide/multi_proc_support.rst
index a73918a5da..2297f3d79f 100644
--- a/doc/guides/prog_guide/multi_proc_support.rst
+++ b/doc/guides/prog_guide/multi_proc_support.rst
@@ -1,5 +1,5 @@
.. SPDX-License-Identifier: BSD-3-Clause
- Copyright(c) 2010-2014 Intel Corporation.
+ Copyright(c) 2010-2026 Intel Corporation.
Multi-process Support
=====================
@@ -30,6 +30,15 @@ after a primary process has already configured the hugepage shared memory for th
Secondary processes which requires access to physical devices in Primary process, must
be passed with the same allow and block options.
+ When the primary process exits, all secondary processes must be terminated,
+ and then restarted after the primary process is re-run to ensure
+ proper re-initialization of shared resources.
+ If secondary processes continue running after the primary process
+ exits, they may experience reduced functionality. In particular,
+ inter-process communication, new memory allocations, and other
+ shared infrastructure will no longer be available, which may lead
+ to unexpected errors.
+
To support these two process types, and other multi-process setups described later,
two additional command-line parameters are available to the EAL:
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index d848de03d8..18acaf6b9e 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -989,6 +989,10 @@ rte_eal_cleanup(void)
/* after this point, any DPDK pointers will become dangling */
rte_eal_memory_detach();
rte_eal_malloc_heap_cleanup();
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY &&
+ !internal_conf->no_shconf &&
+ eal_clean_runtime_dir() < 0)
+ EAL_LOG(WARNING, "Cannot clean runtime directory on exit");
eal_cleanup_config(internal_conf);
eal_lcore_var_cleanup();
rte_eal_log_cleanup();
--
2.43.0
More information about the dev
mailing list