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 93BA2A054F; Mon, 15 Mar 2021 11:52:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1234424261E; Mon, 15 Mar 2021 11:52:19 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 785BA4003C for ; Mon, 15 Mar 2021 11:52:18 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id F1ACDFD2; Mon, 15 Mar 2021 06:52:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 15 Mar 2021 06:52:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= 0o7CEYcROvHRd3lgwpkvKYfgK7EEYxl5AVTAFPZf+v8=; b=K5m0EUdPS7/1Izc2 xCAAvHSasyf5iwhsjz3DUGC+aqqBz2v41x+itSqbKufxMOOjnFFloaMoVvTuEEIY WV0N/+dDre8f11Sf2cD5t+WEgAfWs/PyzGvaQcQ3nBlEWnFBmJLopKZithZ+YXmY 5Lw1Ract9vBHl+1Er87i33iWpavxWMMMrTu/93JNSPETDbbm7w5UwCR981YkTNHU /P76JPBLI/VrPTvc+w5Wrwg60BThzi/a7GXcyaEY03Wv9gsmfb28uvtCDJhECHz3 0Qm0raO34m8LfdVNKR+dNoiXyc93zcIoN2rnYhI//F/kIQw/DD4sifTc7QhYMEe2 5lo0cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=0o7CEYcROvHRd3lgwpkvKYfgK7EEYxl5AVTAFPZf+ v8=; b=voM60YoRBoc8hSnBj/D1J5L6pejKeaAkeTeE/UjYBa1hNWhtxzMAfgAE0 a49wQHpHyg1dcdzBt3Xn+wTjhsgEeteavvqM7Q4i/hqcJegKbFoNWufruBi3fVi7 /eyq5WzkJNzHTDsF2m2PrSabT9mFP3+wt1MyIjaBVcQpA4bt5lYEJnQLpmsNW90o cj8ScdU1OKg+86XdaKyUEQzSZB7bzbM8OsKPNY0briuQA5bIXJ9cuqrgwwBEOzAy lbcHaVn0aOqA0M5mRhJh75h9lhrbm8FBAn677Cfw6bi3AlrtTmlLrj/+b/hQCrbo maRice0sWi9pSUEPjoCID/IozVHhg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvledgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id F0D2D240057; Mon, 15 Mar 2021 06:52:14 -0400 (EDT) From: Thomas Monjalon To: "Kinsella, Ray" Cc: Bruce Richardson , dev@dpdk.org, david.marchand@redhat.com, mb@smartsharesystems.com, Neil Horman Date: Mon, 15 Mar 2021 11:52:13 +0100 Message-ID: <4942393.sW9uhsZSEm@thomas> In-Reply-To: References: <20210309233116.1934666-1-thomas@monjalon.net> <20210315103144.GC2040@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 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 :)