[dpdk-dev] [PATCH] app/pdump: exits once primary app exited

Suanming.Mou mousuanming at huawei.com
Thu Apr 25 18:35:41 CEST 2019


If primary app exited, meaningless for pdump keeps running anymore.

Signed-off-by: Suanming.Mou <mousuanming at huawei.com>
---
 app/pdump/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 3d208548fa13..f1ff2a3ceb4f 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -847,6 +847,10 @@ struct parse_val {
 		pdump_rxtx(pt->rx_ring, pt->rx_vdev_id, &pt->stats);
 	if (pt->dir & RTE_PDUMP_FLAG_TX)
 		pdump_rxtx(pt->tx_ring, pt->tx_vdev_id, &pt->stats);
+
+	/* Once primary exits, so will I. */
+	if (!rte_eal_primary_proc_alive(NULL))
+		quit_signal = 1;
 }
 
 static int
-- 
1.7.12.4



More information about the dev mailing list