patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v3 1/8] dumpcap: handle primary process exit
       [not found] ` <20251019165728.164929-1-stephen@networkplumber.org>
@ 2025-10-19 16:56   ` Stephen Hemminger
  2025-10-19 16:56   ` [PATCH v3 2/8] pdump: " Stephen Hemminger
  1 sibling, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2025-10-19 16:56 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, stable, Reshma Pattan

If primary process exits, then it is not possible (or needed)
to cleanup resources. Instead just exit after closing the
capture file.

Bugzilla ID: 1760
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/dumpcap/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index e5ba36350b..3621c0ebe3 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -1059,6 +1059,10 @@ int main(int argc, char **argv)
 	else
 		pcap_dump_close(out.dumper);
 
+	/* If primary has exited, do not try and communicate with it */
+	if (!rte_eal_primary_proc_alive(NULL))
+		return 0;
+
 	cleanup_pdump_resources();
 
 	rte_ring_free(r);
-- 
2.51.0


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

* [PATCH v3 2/8] pdump: handle primary process exit
       [not found] ` <20251019165728.164929-1-stephen@networkplumber.org>
  2025-10-19 16:56   ` [PATCH v3 1/8] dumpcap: handle primary process exit Stephen Hemminger
@ 2025-10-19 16:56   ` Stephen Hemminger
  1 sibling, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2025-10-19 16:56 UTC (permalink / raw)
  To: dev
  Cc: Stephen Hemminger, stable, Reshma Pattan, Suanming Mou, Anatoly Burakov

If primary process exits, then it is not possible (or needed)
to cleanup resources. Instead just exit after closing the
capture file.

Bugzilla ID: 1760
Fixes: a99a311ba101 ("app/pdump: exit with primary process")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/pdump/main.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index fa85859703..1741d7e709 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -1028,13 +1028,15 @@ main(int argc, char **argv)
 	dump_packets();
 
 	disable_primary_monitor();
-	cleanup_pdump_resources();
+
 	/* dump debug stats */
 	print_pdump_stats();
 
-	ret = rte_eal_cleanup();
-	if (ret)
-		printf("Error from rte_eal_cleanup(), %d\n", ret);
+	/* If primary has exited, do not try and communicate with it */
+	if (!rte_eal_primary_proc_alive(NULL))
+		return 0;
 
-	return 0;
+	cleanup_pdump_resources();
+
+	return rte_eal_cleanup() ? EXIT_FAILURE : 0;
 }
-- 
2.51.0


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

end of thread, other threads:[~2025-10-19 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <250811213632.16023-1-stephen@networkplumber.org>
     [not found] ` <20251019165728.164929-1-stephen@networkplumber.org>
2025-10-19 16:56   ` [PATCH v3 1/8] dumpcap: handle primary process exit Stephen Hemminger
2025-10-19 16:56   ` [PATCH v3 2/8] pdump: " Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).