public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
* [PATCH] eal: clean runtime directory files on exit
@ 2026-03-06  6:08 Mounika Kalamandala
  2026-03-06 16:34 ` Stephen Hemminger
  2026-03-06 16:42 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Mounika Kalamandala @ 2026-03-06  6:08 UTC (permalink / raw)
  To: dev, bruce.richardson, aman.deep.singh; +Cc: shaiq.wani, Mounika Kalamandala

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@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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-06 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06  6:08 [PATCH] eal: clean runtime directory files on exit Mounika Kalamandala
2026-03-06 16:34 ` Stephen Hemminger
2026-03-06 16:42 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox