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 3EE47A054F; Mon, 15 Mar 2021 11:43:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B176A242611; Mon, 15 Mar 2021 11:43:05 +0100 (CET) Received: from dal3relay3.mxroute.com (dal3relay3.mxroute.com [64.40.27.3]) by mails.dpdk.org (Postfix) with ESMTP id 6D34C4003C for ; Mon, 15 Mar 2021 11:43:04 +0100 (CET) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by dal3relay3.mxroute.com (ZoneMTA) with ESMTPSA id 178357b5f6600092ce.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Mon, 15 Mar 2021 10:43:01 +0000 X-Zone-Loop: ed0971ed6c3c1217261c11619aa5a9219cbd828c8fd6 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ashroe.eu; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2Ym5Gd6HT6L0MAD+khkMVtX+BsSgLatNWqKbqMd15BA=; b=EDjAx4jwClu5/3hjGe9El58oP/ mzGouu6fx2IxUFGFuxm4UxildG23uJWhhZDhZd0NpsxIfygzU/cABjlOpz1K4/1PZhL4ZeLS1VgdP TAkN+tG7feRFnpe2bZIB50oDgkKHPUX6iPYC92GoiRbmZRgrxLXLAYVXx6fL+1m1YQy2h4Y0FYJCQ pWk+1twoilsuII7wsyRTtE5hcE0U//2GES8XimHqoB+caJ5fuK/wHbfbGdJw1D04oG10p17tnokfg pYOht5N/Rj2XQd0hoMZa5DwAIyN3Xuksg14xfjSYkvnJDsQXdZIeMHHdtntD6lZlg5LJgshKdVbHR XX+Y3emA==; To: Bruce Richardson Cc: Thomas Monjalon , dev@dpdk.org, david.marchand@redhat.com, mb@smartsharesystems.com, Neil Horman References: <20210309233116.1934666-1-thomas@monjalon.net> <20210312181720.242252-1-thomas@monjalon.net> <20210312181720.242252-8-thomas@monjalon.net> <44934eac-9808-ada4-fe97-7d24382bced4@ashroe.eu> <20210315103144.GC2040@bricha3-MOBL.ger.corp.intel.com> From: "Kinsella, Ray" Message-ID: Date: Mon, 15 Mar 2021 10:42:57 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210315103144.GC2040@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-AuthUser: mdr@ashroe.eu Subject: Re: [dpdk-dev] [PATCH v3 07/11] eal: add log level help 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 15/03/2021 10:31, Bruce Richardson wrote: > On Mon, Mar 15, 2021 at 10:19:47AM +0000, Kinsella, Ray wrote: >> >> >> On 12/03/2021 18:17, Thomas Monjalon wrote: >>> The option --log-level was not completely described in the usage text, >>> and it was difficult to guess the names of the log types and levels. >>> >>> A new value "help" is accepted after --log-level to give more details >>> about the syntax and listing the log types and levels. >>> >>> The array "levels" used for level name parsing is replaced with >>> a (modified) existing function which was used in rte_log_dump(). >>> >>> The new function rte_log_list_types() is exported in the API >>> for allowing an application to give this info to the user >>> if not exposing the EAL option --log-level. >>> The list of log types cannot include all drivers if not linked in the >>> application (shared object plugin case). >>> >>> Signed-off-by: Thomas Monjalon >>> --- >>> lib/librte_eal/common/eal_common_log.c | 24 +++++++++--- >>> lib/librte_eal/common/eal_common_options.c | 44 +++++++++++++++------- >>> lib/librte_eal/common/eal_log.h | 5 +++ >>> lib/librte_eal/include/rte_log.h | 11 ++++++ >>> lib/librte_eal/version.map | 3 ++ >>> 5 files changed, 69 insertions(+), 18 deletions(-) >>> > >>> @@ -1274,6 +1286,11 @@ eal_parse_log_level(const char *arg) >>> char *str, *level; >>> int priority; >>> >>> + if (strcmp(arg, "help") == 0) { >> >> So I think the convention is to support both "?" and "help". >> Qemu does this at least. >> > I've seen "/?" used for help on windows binaries, but "-?" not so much in the > linux world, where --help (and often -h for short) seem to be the standard. > This is slightly different - it is where you are looking to return a list of valid values for a parameter. So for instance in qemu mentioned above  ~ > qemu-system-x86_64 -cpu ? | head -n 10 Available CPUs: x86 486 (alias configured by machine type) x86 486-v1 x86 Broadwell (alias configured by machine type) x86 Broadwell-IBRS (alias of Broadwell-v3) x86 Broadwell-noTSX (alias of Broadwell-v2) x86 Broadwell-noTSX-IBRS (alias of Broadwell-v4) x86 Broadwell-v1 Intel Core Processor (Broadwell) x86 Broadwell-v2 Intel Core Processor (Broadwell, no TSX) x86 Broadwell-v3 Intel Core Processor (Broadwell, IBRS)