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 CFD18A0567; Wed, 10 Mar 2021 14:27:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55B844068C; Wed, 10 Mar 2021 14:27:04 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 4A70840687 for ; Wed, 10 Mar 2021 14:27:02 +0100 (CET) IronPort-SDR: lS0MtwFMzZmP05f5bH1GWR+ZIIEufNsV2vLoB/6iHXIfoloKpB6pZl2IOw4IbPHTG0OCGcM+ZS XjinQvA8Xmsw== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="188501860" X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="188501860" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 05:27:00 -0800 IronPort-SDR: YvebAp/O0dFBoftybfn0OwYLU8r9GJSUp98CS10SOXqsXea3utkxduIV+tmzG5GZFfRY7n7dhx 8CpScL97VxnQ== X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="403676426" 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 05:26:59 -0800 Date: Wed, 10 Mar 2021 13:26:52 +0000 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com Message-ID: <20210310132652.GB1267@bricha3-MOBL.ger.corp.intel.com> References: <20210309233116.1934666-1-thomas@monjalon.net> <20210309233116.1934666-7-thomas@monjalon.net> <20210310121924.GA1267@bricha3-MOBL.ger.corp.intel.com> <9127530.BAheoJpsKH@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9127530.BAheoJpsKH@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 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.