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 9C909A0567; Wed, 10 Mar 2021 01:45:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EF2922A2B5; Wed, 10 Mar 2021 01:45:15 +0100 (CET) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id 6B90A40687 for ; Wed, 10 Mar 2021 01:45:14 +0100 (CET) Received: by mail-pg1-f175.google.com with SMTP id a4so10208494pgc.11 for ; Tue, 09 Mar 2021 16:45:14 -0800 (PST) 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=T3aAbboB+2erjLcEUifD7Suhzk/bGnjL/tgbAe7KGak=; b=RZL2JqmfdGm8i1SSGTyzeTC+u3aJVvH7SqSvZfG9tTorYUKYK7IHwlxfZOiFguQsb/ tdD1/FkwyO6yLx46lu0AMBmNeQ+8Y7aMxH2hfwsVa5/ah331LNO7KFzAM5eicxLkLZRL cx3gFiGxLepV/Ru/NrAsg7Q9kpvaMTBYqgvN3XYfOoB4wZtasVToI/PrrP+I6VeyxVqx nEGa12HgB3WyXlXXyqmaE8EloeAkL1Gm3x7J+3wKcLusMNxsMX8LeH0huRgNOrfWAosn Q58AFocZQsHFlbfj1SBIR+AyrpBFCOQ9yfn+wXS8g20FVHTMDNOJwDbGZeqs2Gd4OHaF x+oA== 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=T3aAbboB+2erjLcEUifD7Suhzk/bGnjL/tgbAe7KGak=; b=HoTAaBeM4R88Pl4EbVHUg8IBmauhdvpU93WUIIg9JowSk91LbOzQMsu6z76Bp5A57u 32KMX8Y+gUqLpU5HrlTAmsvJJOaVcvRuYRdCr+M6YR0CnFKCEgpt2iUmUk3zkXb3MT6Q we9MfcB93YLtGAiG1arKcXq2PyPa2Da/kQfjYpz8owl8035SWkAwnunTCPSNUZ8oyvL+ usPPL4LJyHT/d5NajGcBj51DgdilwGmLXus+LEJzzem0dXwDHctBh9GdiETggWJyIiPg z487qOTXnMWwIpb5V2TCUmVokmNmSuvH2OF3ykuFXF5PYPADkB+0pWUDp3OvowKV66lX l4bQ== X-Gm-Message-State: AOAM533jLglDNdEyl8HNTLtBu1IbiW5WG7kEV91fOTCcdYyu0WwdzIHL c801CkivIvJmQRoBTdc0Uk3yEA== X-Google-Smtp-Source: ABdhPJzdrei/ucT3+4ueV7g/gAScH40kSusx1EXZsmMrwqbyPU6fpb2boQceghco1FciDgPl6ksnGQ== X-Received: by 2002:a05:6a00:8d2:b029:1f1:5b57:85ae with SMTP id s18-20020a056a0008d2b02901f15b5785aemr594427pfu.60.1615337113472; Tue, 09 Mar 2021 16:45:13 -0800 (PST) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id f20sm14420102pfa.10.2021.03.09.16.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 16:45:13 -0800 (PST) Date: Tue, 9 Mar 2021 16:45:05 -0800 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com Message-ID: <20210309164505.715c5f7f@hermes.local> In-Reply-To: <20210309233116.1934666-1-thomas@monjalon.net> References: <20210309233116.1934666-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 00/11] improve options 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 Wed, 10 Mar 2021 00:31:04 +0100 Thomas Monjalon wrote: > The main intent of this series is to provide a nice help > for the --log-level option. > More patches are added to improve options help in general. > > Thomas Monjalon (11): > eal: explain argv behaviour during init > eal: improve options usage text > eal: use macros for help option > eal: move private log functions > eal: introduce maximum log level macro > eal: catch invalid log level number > eal: add log level help > app: fix exit messages > app: hook in EAL usage help > app/regex: fix usage text > app/testpmd: fix usage text > > app/pdump/main.c | 2 + > app/proc-info/main.c | 2 + > app/test-acl/main.c | 2 + > app/test-bbdev/main.c | 3 +- > app/test-compress-perf/comp_perf_options.h | 2 + > .../comp_perf_options_parse.c | 10 +-- > app/test-compress-perf/main.c | 3 +- > app/test-crypto-perf/cperf_options.h | 2 + > app/test-crypto-perf/cperf_options_parsing.c | 10 +-- > app/test-crypto-perf/main.c | 3 +- > app/test-fib/main.c | 8 +++ > app/test-flow-perf/main.c | 63 +++++++++--------- > app/test-pmd/parameters.c | 34 ++-------- > app/test-pmd/testpmd.c | 2 + > app/test-pmd/testpmd.h | 1 + > app/test-regex/main.c | 10 +-- > app/test-sad/main.c | 7 ++ > lib/librte_eal/common/eal_common_log.c | 50 +++++++++----- > lib/librte_eal/common/eal_common_options.c | 66 ++++++++++++------- > lib/librte_eal/common/eal_log.h | 32 +++++++++ > lib/librte_eal/common/eal_private.h | 29 -------- > lib/librte_eal/freebsd/eal.c | 10 +-- > lib/librte_eal/include/rte_eal.h | 2 + > lib/librte_eal/include/rte_log.h | 12 ++++ > lib/librte_eal/linux/eal.c | 17 ++--- > lib/librte_eal/linux/eal_log.c | 4 +- > lib/librte_eal/version.map | 3 + > lib/librte_eal/windows/eal.c | 15 ++--- > lib/librte_eal/windows/eal_log.c | 6 +- > 29 files changed, 237 insertions(+), 173 deletions(-) > create mode 100644 lib/librte_eal/common/eal_log.h > It probably isn't worth the effort, but python argparse style is much easier (and self documenting) compared to the C getopt stuff. There are several C versions of similar libraries. https://github.com/cofyc/argparse https://www.argtable.org/