From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 6EA83A0A02;
	Wed, 24 Mar 2021 16:03:58 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 03680140EB1;
	Wed, 24 Mar 2021 16:03:58 +0100 (CET)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [216.205.24.124])
 by mails.dpdk.org (Postfix) with ESMTP id C731C140EAC
 for <dev@dpdk.org>; Wed, 24 Mar 2021 16:03:56 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1616598235;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=2MEIN+7zqkPknYuQHa2Zboe+07lkW36JZmIXNQjKiSo=;
 b=US2N+5i+TnpBiMH11+tU/kBoyWAW/zR23eO8VNUCrF8452NSZh26R4yodV2A6jk4gvG4uN
 og3V14JVKqA48QiA/Yvgcr2S3S1zvSC0rNM5Ml1JzIcE7w8V2L0wjD0d2fKVaFf9uxW/YJ
 mxGLRzI+8D2m3g8RdyLNAhdX5phdnKc=
Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com
 [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-221-OE5oJTc7MLyzAaTK3BdzNw-1; Wed, 24 Mar 2021 11:03:54 -0400
X-MC-Unique: OE5oJTc7MLyzAaTK3BdzNw-1
Received: by mail-vk1-f197.google.com with SMTP id s69so226572vkd.20
 for <dev@dpdk.org>; Wed, 24 Mar 2021 08:03:53 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=2MEIN+7zqkPknYuQHa2Zboe+07lkW36JZmIXNQjKiSo=;
 b=uQ9pusV9T9fUbN28Dd931eOU7UCvF+uYxc2C9Nuc1FNGQp4cvScUav9FfhTWZMIWzP
 bBsCD1rLp8ig/0mcBqc3/3vEbw3EZ7Od9PPSaRWqa2/+LyheI8nl+0V4CuqonYlFIN+6
 G0rCZGIBnmsgEDVjp51UXrRhgMQGpGInFx3hPl1bXtX1g2Wo9cC53qpyMrRA4KQJohWc
 MYBLGWhMLJT2jzBc121WyBYGHNVy/hDkuHEaWwOiOs0GybxCTBKtVfnPa3H29CueMpjo
 2JYFcpenVb0I+1yx/NjIhV1ru6M/Z2nlOSLktDn6eeQ56OHHhCVB+CLAHXiaotH71Mxn
 jt3A==
X-Gm-Message-State: AOAM532A6DyX+JBEJVaaHiOk6hU0CNXmXk5hA7pLueKufxhrDBWiiS43
 wfP61Fj/2ky7ODHR+C278k9AKCLRdtFPlNcX5grAaYHj9ZVDHBlM47mvpny1CM/u2T0ADR/ei+S
 9McK2zfXw28127lOl89M=
X-Received: by 2002:ab0:390d:: with SMTP id b13mr2015027uaw.53.1616598232402; 
 Wed, 24 Mar 2021 08:03:52 -0700 (PDT)
X-Google-Smtp-Source: ABdhPJypV2lbU2OsDENt34guWsrtYtVU+cX3ndVeVi1oIVCyKOmFv4hTApVxX9+XMjcEPzOF9DzZM6mYOSPG3omunoo=
X-Received: by 2002:ab0:390d:: with SMTP id b13mr2014987uaw.53.1616598232083; 
 Wed, 24 Mar 2021 08:03:52 -0700 (PDT)
MIME-Version: 1.0
References: <20210309233116.1934666-1-thomas@monjalon.net>
 <20210321223116.1340974-1-thomas@monjalon.net>
In-Reply-To: <20210321223116.1340974-1-thomas@monjalon.net>
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 24 Mar 2021 16:03:40 +0100
Message-ID: <CAJFAV8yHuAsAy3NYRxOCCLffeiSqQyc70dFV0__XM_0fGejFhw@mail.gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev <dev@dpdk.org>
Authentication-Results: relay.mimecast.com;
 auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [PATCH v4 00/11] improve options help
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Sun, Mar 21, 2021 at 11:31 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> The main intent of this series is to provide a nice help
> for the --log-level option.

The changes on usage() and the --log-level help are not related and
could have been separated in two series.

Like a series with:
  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

About these --log-level related patches, I am ok with them (with just
a comment on sorting logtypes).

Then a series with:
  eal: explain argv behaviour during init
  eal: improve options usage text
  app: fix exit messages
  app: hook in EAL usage help
  app/regex: fix usage text
  app/testpmd: fix usage text

For the usage() patches, the main enhancement comes from hooking the
app/ usage() to rte_set_application_usage_hook().

As for the "eal: improve options usage text" patch, there are two
changes in behavior.

Taking testpmd as an example:

"""
Usage: ./build/app/dpdk-testpmd [EAL options] -- [testpmd options]

  --interactive: run in interactive mode.
  --cmdline-file: execute cli commands before startup.
  --auto-start: start forwarding on init [always when non-interactive].
  --help: display this message and quit.
  --tx-first: start forwarding sending a burst first (only if
interactive is disabled).
  --stats-period=PERIOD: statistics will be shown every PERIOD seconds
(only if interactive is disabled).
[snip]
  --hairpin-mode=0xXX: bitmask set the hairpin port mode.
    0x10 - explicit Tx rule, 0x02 - hairpin ports paired
    0x01 - hairpin ports loop, 0x00 - hairpin port self

EAL common options:
  -c COREMASK         Hexadecimal bitmask of cores to run on
  -l CORELIST         List of cores to run on
                      The argument format is <c1>[-c2][,c3[-c4],...]
                      where c1, c2, etc are core indexes between 0 and 128
  --lcores COREMAP    Map lcore set to physical cpu set
                      The argument format is
[snip]
"""

- The "Usage: " lists [EAL options] first, so I would expect them to
be listed first.
Hence I am not a fan of the reordering.


- Testpmd options are not identified anymore while it was easier
before to find out about it with the "===== Application Usage ====="
banner.
Applications now must add a banner to differentiate their options from
the EAL ones.


-- 
David Marchand