From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B17B63772 for ; Thu, 2 May 2019 13:31:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2019 04:31:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,421,1549958400"; d="scan'208";a="342693390" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.113]) ([10.237.220.113]) by fmsmga005.fm.intel.com with ESMTP; 02 May 2019 04:31:39 -0700 To: "Suanming.Mou" , dev@dpdk.org Cc: vipin.varghese@intel.com References: <1556774432-59147-1-git-send-email-mousuanming@huawei.com> <1556800505-59917-1-git-send-email-mousuanming@huawei.com> From: "Burakov, Anatoly" Message-ID: <44ebb8b6-7960-8fd2-532c-440b085028a3@intel.com> Date: Thu, 2 May 2019 12:31:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1556800505-59917-1-git-send-email-mousuanming@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v7] app/pdump: add pudmp exits with primary support 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, 02 May 2019 11:31:42 -0000 On 02-May-19 1:35 PM, Suanming.Mou wrote: > When primary app exits, the residual running pdump will stop the > primary app to restart. Add pdump exits with primary support. > > Signed-off-by: Suanming.Mou > --- <...> > + if (rte_eal_primary_proc_alive(NULL)) { > + rte_eal_alarm_set(MONITOR_INTERVAL, monitor_primary, NULL); > + return; > + } > + > + printf("Exiting dump while primary is not alive...\n"); May i suggest rewording: Primary process is no longer active, exiting I think the above would be clearer. Otherwise, Reviewed-by: Anatoly Burakov > + quit_signal = 1; > +} > + > +static void > print_pdump_stats(void) > { > + disable_primary_monitor(); > cleanup_pdump_resources(); > /* dump debug stats */ > print_pdump_stats(); > diff --git a/doc/guides/tools/pdump.rst b/doc/guides/tools/pdump.rst > index 53cd2b4..62b4a5e 100644 > --- a/doc/guides/tools/pdump.rst > +++ b/doc/guides/tools/pdump.rst > @@ -26,6 +26,8 @@ a DPDK secondary process and is capable of enabling packet capture on dpdk ports > Once the libpcap development files are installed, the libpcap based PMD > can be enabled by setting CONFIG_RTE_LIBRTE_PMD_PCAP=y and recompiling the DPDK. > > + * The ``dpdk-pdump`` tool runs as a DPDK secondary process. It exits when > + the primary application exits. > > Running the Application > ----------------------- > Worth adding this to release notes as well? -- Thanks, Anatoly 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 DC501A0AC5 for ; Thu, 2 May 2019 13:31:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC11D4C8D; Thu, 2 May 2019 13:31:43 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B17B63772 for ; Thu, 2 May 2019 13:31:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2019 04:31:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,421,1549958400"; d="scan'208";a="342693390" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.113]) ([10.237.220.113]) by fmsmga005.fm.intel.com with ESMTP; 02 May 2019 04:31:39 -0700 To: "Suanming.Mou" , dev@dpdk.org Cc: vipin.varghese@intel.com References: <1556774432-59147-1-git-send-email-mousuanming@huawei.com> <1556800505-59917-1-git-send-email-mousuanming@huawei.com> From: "Burakov, Anatoly" Message-ID: <44ebb8b6-7960-8fd2-532c-440b085028a3@intel.com> Date: Thu, 2 May 2019 12:31:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1556800505-59917-1-git-send-email-mousuanming@huawei.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v7] app/pdump: add pudmp exits with primary support 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: <20190502113138.2i9AsaMh6aD8k6YK9492F4KqwrJDdUoDukK2WQXa5wg@z> On 02-May-19 1:35 PM, Suanming.Mou wrote: > When primary app exits, the residual running pdump will stop the > primary app to restart. Add pdump exits with primary support. > > Signed-off-by: Suanming.Mou > --- <...> > + if (rte_eal_primary_proc_alive(NULL)) { > + rte_eal_alarm_set(MONITOR_INTERVAL, monitor_primary, NULL); > + return; > + } > + > + printf("Exiting dump while primary is not alive...\n"); May i suggest rewording: Primary process is no longer active, exiting I think the above would be clearer. Otherwise, Reviewed-by: Anatoly Burakov > + quit_signal = 1; > +} > + > +static void > print_pdump_stats(void) > { > + disable_primary_monitor(); > cleanup_pdump_resources(); > /* dump debug stats */ > print_pdump_stats(); > diff --git a/doc/guides/tools/pdump.rst b/doc/guides/tools/pdump.rst > index 53cd2b4..62b4a5e 100644 > --- a/doc/guides/tools/pdump.rst > +++ b/doc/guides/tools/pdump.rst > @@ -26,6 +26,8 @@ a DPDK secondary process and is capable of enabling packet capture on dpdk ports > Once the libpcap development files are installed, the libpcap based PMD > can be enabled by setting CONFIG_RTE_LIBRTE_PMD_PCAP=y and recompiling the DPDK. > > + * The ``dpdk-pdump`` tool runs as a DPDK secondary process. It exits when > + the primary application exits. > > Running the Application > ----------------------- > Worth adding this to release notes as well? -- Thanks, Anatoly