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 633D4A0679 for ; Mon, 29 Apr 2019 11:14:48 +0200 (CEST) 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" Message-ID: <20190429091442.wmSzw-c7A6Zjak9P-jysXyoJLOxEwJuifZiZd7xbBp8@z> 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