From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 5A0AF3977 for ; Thu, 25 Apr 2019 16:33:40 +0200 (CEST) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 1E66B6C8987E82CF52CF for ; Thu, 25 Apr 2019 22:33:36 +0800 (CST) Received: from huawei.com (10.175.100.202) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Thu, 25 Apr 2019 22:33:30 +0800 From: Suanming.Mou To: CC: Date: Thu, 25 Apr 2019 16:35:41 +0000 Message-ID: <1556210141-43153-1-git-send-email-mousuanming@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.100.202] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] app/pdump: exits once primary app exited X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Apr 2019 14:33:40 -0000 If primary app exited, meaningless for pdump keeps running anymore. Signed-off-by: Suanming.Mou --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 496EFA05D3 for ; Thu, 25 Apr 2019 16:33:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44D5558EC; Thu, 25 Apr 2019 16:33:42 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 5A0AF3977 for ; Thu, 25 Apr 2019 16:33:40 +0200 (CEST) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 1E66B6C8987E82CF52CF for ; Thu, 25 Apr 2019 22:33:36 +0800 (CST) Received: from huawei.com (10.175.100.202) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Thu, 25 Apr 2019 22:33:30 +0800 From: Suanming.Mou To: CC: Date: Thu, 25 Apr 2019 16:35:41 +0000 Message-ID: <1556210141-43153-1-git-send-email-mousuanming@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Originating-IP: [10.175.100.202] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] app/pdump: exits once primary app exited X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190425163541.f3cJiAimOks1QFjNXPv451_EvnhfQJsJx-NzfU0zavM@z> If primary app exited, meaningless for pdump keeps running anymore. Signed-off-by: Suanming.Mou --- 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