From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v3 4/8] eal: change specific log levels at startup Date: Tue, 18 Apr 2017 13:56:16 +0200 Message-ID: <20170418135616.5be389d6@glumotte.dev.6wind.com> References: <20170329155323.4760-1-olivier.matz@6wind.com> <20170404164040.24132-1-olivier.matz@6wind.com> <20170404164040.24132-5-olivier.matz@6wind.com> <88ff6283-4b3f-f3a7-0d44-9be8fe5441c1@intel.com> <20170418105047.266cd8a0@glumotte.dev.6wind.com> <632c7fa5-153d-8a97-0810-a4ac8795046e@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, david.marchand@6wind.com, bruce.richardson@intel.com, thomas.monjalon@6wind.com, keith.wiles@intel.com, stephen@networkplumber.org, "De Lara Guarch, Pablo" To: "Tan, Jianfeng" Return-path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id BE203F94 for ; Tue, 18 Apr 2017 13:55:49 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id u2so52734955wmu.0 for ; Tue, 18 Apr 2017 04:55:49 -0700 (PDT) In-Reply-To: <632c7fa5-153d-8a97-0810-a4ac8795046e@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Jianfeng, On Tue, 18 Apr 2017 19:15:51 +0800, "Tan, Jianfeng" wrote: > On 4/18/2017 4:50 PM, Olivier MATZ wrote: > > Hi Jianfeng, > > > > On Fri, 14 Apr 2017 13:33:49 +0800, "Tan, Jianfeng" wrote: > >> Hi Olivier, > >> > >> If I understand it correctly, this patch is to shift log level setting > >> earlier. But we did not remove the one in eal_parse_common_option(). So > >> we can see this parameter will be analyzed twice. Does it make sense to > >> remove analysis of log level in eal_parse_common_option()? > >> > > The patch does not change the way the log level is parsed: it was > > already parsed twice, because we want to know the log level as soon > > as possible. > > Oh, yes, it's not introduced in this patch. How do you think if we move > log parser out from eal_parse_common_option to avoid parsing log twice? Not sure it's so easy to do. The second pass can ignore the --log-level argument, but it has to be recognized, else we would have an error. I think it's ok like this. > > > > > But the patch introduces a bug, as seen by Ferruh: the default log > > level is not set properly when no --log-level parameter is passed. > > > > Before this one, there is another one on usage of regexec(), which I put > it here: http://dpdk.org/ml/archives/dev/2017-April/064031.html. Yes, I've seen it, I'll send a patch for this today. Thanks. Olivier