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 1FC2CA054F; Mon, 15 Mar 2021 16:59:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D38354068C; Mon, 15 Mar 2021 16:59:47 +0100 (CET) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id 41ECD4068B for ; Mon, 15 Mar 2021 16:59:46 +0100 (CET) Received: by mail-pj1-f52.google.com with SMTP id ha17so8277887pjb.2 for ; Mon, 15 Mar 2021 08:59:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DLdQDoN2Z3YElK2m3Kun/mqgQ9VF0ohnIKrppX48gc8=; b=dokJvrVIC41gXU4CcbikzlJ6umXrPx1Q7xCFHV+FSmcwiFxwAHG8pyPPoKTaRdYfuL 8cQWOyCy27oL1PdYu3ZoOGwV14Hf1t8r6r9rjYEmK8CQylVHO6lohmlQ0MMc1kBsTc+B WE5iatsmZ40VOVEUOLTRnj4QODHJsZw44HiMj43bQvxhyp1797RKVkys3axjtikDzII5 4Fhc0b2iqLgTB+YA3OCpOfgHsmSgKwyAciloCEUo5vLLWzykyzx65zJWfHhhyWvEp2bm KgqRl9YJYZh6jjdlxv1Q5MLIco6A0V3tl+NFe9hla0/UX7S2yRxnZ//9gmgjs9bQVSyl gPdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DLdQDoN2Z3YElK2m3Kun/mqgQ9VF0ohnIKrppX48gc8=; b=N9NP8xewl2a1VgT5Odo+F5oowce974WynHWNs/PPMLrQNzG8DSQwu9yPYtxlGm2gGG Jbtm11VRDhxSopvjm8ZrWD18RVap2ICwkrXcBRT8WHGkIsjTWIEvSWWpKl3YaUBnQp/a ZT9QyaUFH+3QzVBC2jtr4kV965IYO7xH+tY0dadDk7rnUqTdokkg9qiB8MV+HpSvYgLt zxuBWeTdZVYQpAT4bmS9K9AwN4XujFIWe274odkaSxdq5qYQtzfYeL/pT8a1tQF2z5BH +oSVc2cbTJ9o9AU28bRatr+lcnEeerXAxtHsBDmHyX9/iGHW4l8ID0oOIYAK43lLWq8S omDg== X-Gm-Message-State: AOAM530jnaneupZY+k3DKD/L9PdpxvSm3hznMr/xqaYd5zO4Aes+pNSD QMAAQNugUz4FQHDSNBnc5LikZw== X-Google-Smtp-Source: ABdhPJwkS4V2D2szO96zu6dELEI+HD4n872f+W7rxNI+4fQM6SWv9dBQpMf1RlBGLRqr/tOo70lWCQ== X-Received: by 2002:a17:90a:5d09:: with SMTP id s9mr13207159pji.172.1615823985377; Mon, 15 Mar 2021 08:59:45 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id w15sm7189864pfn.84.2021.03.15.08.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 08:59:44 -0700 (PDT) Date: Mon, 15 Mar 2021 08:59:41 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: "Kinsella, Ray" , Bruce Richardson , dev@dpdk.org, david.marchand@redhat.com, mb@smartsharesystems.com, Neil Horman Message-ID: <20210315085941.2367c953@hermes.local> In-Reply-To: <4942393.sW9uhsZSEm@thomas> References: <20210309233116.1934666-1-thomas@monjalon.net> <20210315103144.GC2040@bricha3-MOBL.ger.corp.intel.com> <4942393.sW9uhsZSEm@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Mon, 15 Mar 2021 11:52:13 +0100 Thomas Monjalon wrote: > 15/03/2021 11:42, Kinsella, Ray: > > > > 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 > > "?" is a special character. > In my zsh, I need to quote it to avoid globbing parsing, > so I'm not a fan. > > I will let you extend the syntax in a separate patch :) > > Also '?' is used by getopt to match unknown option. So qemu might just be doing that as unintended side effect of any unknown option