From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6716EA0567; Wed, 10 Mar 2021 17:52:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D878B40F35; Wed, 10 Mar 2021 17:52:41 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 06A8D4069F for ; Wed, 10 Mar 2021 17:52:39 +0100 (CET) IronPort-SDR: nBJJAwH4868iYPuRTTFWv/93PKij2cnLzcL9GCIqxCodqcaZyA5K57aaK4Upi/VxWgccGjlI9w PIUvJuqGwUJg== X-IronPort-AV: E=McAfee;i="6000,8403,9919"; a="168427520" X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="168427520" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 08:52:24 -0800 IronPort-SDR: kAMeV8ThCmPidxxiXA1Nn4gAeukatmd5aaczr7kLIIjopoBwaItXGxbcZ8Bxqq881njsPTu6R3 NxWguCvmbCNQ== X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="403745701" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.9.86]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 10 Mar 2021 08:52:23 -0800 Date: Wed, 10 Mar 2021 16:52:19 +0000 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com Message-ID: <20210310165219.GD1267@bricha3-MOBL.ger.corp.intel.com> References: <20210309233116.1934666-1-thomas@monjalon.net> <9127530.BAheoJpsKH@thomas> <20210310132652.GB1267@bricha3-MOBL.ger.corp.intel.com> <3162311.zfhkGMNLAV@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3162311.zfhkGMNLAV@thomas> Subject: Re: [dpdk-dev] [PATCH 06/11] eal: catch invalid log level number X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Wed, Mar 10, 2021 at 02:35:47PM +0100, Thomas Monjalon wrote: > 10/03/2021 14:26, Bruce Richardson: > > On Wed, Mar 10, 2021 at 01:33:20PM +0100, Thomas Monjalon wrote: > > > 10/03/2021 13:19, Bruce Richardson: > > > > On Wed, Mar 10, 2021 at 12:31:10AM +0100, Thomas Monjalon wrote: > > > > > The parsing check for invalid log level was not trying to catch > > > > > irrelevant numeric values. > > > > > A log level 0 or too high is now a failure in options parsing > > > > > so it can be caught early. > > > > > > > > > > Signed-off-by: Thomas Monjalon > > > > > > > > One thing I'd note here is that our log range of 1 to 8 is a little > > > > strange, and that it would be nice if we could accept 9 as a valid log > > > > level too on the cmdline. Ideally 0 would also be acceptable, for all > > > > logging off, but it's more likely that people want to up the log level than > > > > reduce it, and 9 is a more expected max value than 8. > > > > > > Why 9 is more expected? > > > > > > > Because a scale of 0-9 is more logical in the decimal system. > > We could also generalize that any number >8 is just reduced to 8 and > > we issue a warning and continue. > > In this case, we should accept any high value, not limiting arbitrary > to 9, and emit a warning. > +1