From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3934C43219 for ; Mon, 29 Apr 2019 09:14:48 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 3407C21473 for ; Mon, 29 Apr 2019 09:14:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3407C21473 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F35AB3256; Mon, 29 Apr 2019 11:14:46 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id CF74C29D2 for ; Mon, 29 Apr 2019 11:14:45 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Apr 2019 02:14:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,409,1549958400"; d="scan'208";a="168891065" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.113]) ([10.237.220.113]) by fmsmga001.fm.intel.com with ESMTP; 29 Apr 2019 02:14:44 -0700 To: "Suanming.Mou" , dev@dpdk.org Cc: vipin.varghese@intel.com References: <1556210141-43153-1-git-send-email-mousuanming@huawei.com> <1556427506-49150-1-git-send-email-mousuanming@huawei.com> From: "Burakov, Anatoly" Message-ID: Date: Mon, 29 Apr 2019 10:14:42 +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: <1556427506-49150-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 v2] app/pdump: add exit_with_primary option 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" On 28-Apr-19 5:58 AM, Suanming.Mou wrote: > When primary app exits, the residual running pdump will stop > the primary app to restart. Add an exit_with_primary option > to make pdump exit with primary. > > Suggested-by: Varghese, Vipin > Suggested-by: Burakov, Anatoly > Signed-off-by: Suanming.Mou > --- > app/pdump/main.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/app/pdump/main.c b/app/pdump/main.c > index 3d20854..3909f15 100644 > --- a/app/pdump/main.c > +++ b/app/pdump/main.c > @@ -26,11 +26,14 @@ > #include > #include > #include > +#include > > #define CMD_LINE_OPT_PDUMP "pdump" > #define CMD_LINE_OPT_PDUMP_NUM 256 > #define CMD_LINE_OPT_MULTI "multi" > #define CMD_LINE_OPT_MULTI_NUM 257 > +#define CMD_LINE_OPT_EXIT_WP "exit_with_primary" > +#define CMD_LINE_OPT_EXIT_WP_NUM 258 Unrelated to this patch, but seems very flaky and prone to error. How about replacing this stuff with enum-based automatic value assignment, like in lib/librte_eal/common/eal_options.h ? > #define PDUMP_PORT_ARG "port" > #define PDUMP_PCI_ARG "device_id" > #define PDUMP_QUEUE_ARG "queue" > @@ -65,6 +68,7 @@ > #define SIZE 256 > #define BURST_SIZE 32 > #define NUM_VDEVS 2 > +#define MONITOR_INTERVEL (500 * 1000) I believe it should be INTERVAL > > /* true if x is a power of 2 */ > #define POWEROF2(x) ((((x)-1) & (x)) == 0) > @@ -143,12 +147,14 @@ struct parse_val { > static struct rte_eth_conf port_conf_default; > static volatile uint8_t quit_signal; > static uint8_t multiple_core_capture; > +static uint8_t exit_with_primary; > > > @@ -403,6 +410,9 @@ struct parse_val { > case CMD_LINE_OPT_MULTI_NUM: > multiple_core_capture = 1; > break; > + case CMD_LINE_OPT_EXIT_WP_NUM: > + exit_with_primary = 1; > + break; Any particular reason why it is not made the default? -- Thanks, Anatoly