From: David Ahern <dsahern@gmail.com>
To: Petr Machata <me@pmachata.org>,
netdev@vger.kernel.org, stephen@networkplumber.org
Cc: john.fastabend@gmail.com, jiri@nvidia.com, idosch@nvidia.com,
Jakub Kicinski <kuba@kernel.org>, Roman Mashak <mrv@mojatatu.com>
Subject: Re: [PATCH iproute2-next v2 00/11] Add a tool for configuration of DCB
Date: Sat, 31 Oct 2020 09:51:08 -0600 [thread overview]
Message-ID: <0bdc221e-e9dc-347c-a2fe-40efe358da00@gmail.com> (raw)
In-Reply-To: <cover.1604059429.git.me@pmachata.org>
On 10/30/20 6:29 AM, Petr Machata wrote:
> The Linux DCB interface allows configuration of a broad range of
> hardware-specific attributes, such as TC scheduling, flow control, per-port
> buffer configuration, TC rate, etc.
>
...
> The patchset proceeds as follows:
>
> - Many tools in iproute2 have an option to work in batch mode, where the
> commands to run are given in a file. The code to handle batching is
> largely the same independent of the tool in question. In patch #1, add a
> helper to handle the batching, and migrate individual tools to use it.
>
> - A number of configuration options come in a form of an on-off switch.
> This in turn can be considered a special case of parsing one of a given
> set of strings. In patch #2, extract helpers to parse one of a number of
> strings, on top of which build an on-off parser.
>
> Currently each tool open-codes the logic to parse the on-off toggle. A
> future patch set will migrate instances of this code over to the new
> helpers.
>
> - The on/off toggles from previous list item sometimes need to be dumped.
> While in the FP output, one typically wishes to maintain consistency with
> the command line and show actual strings, "on" and "off", in JSON output
> one would rather use booleans. This logic is somewhat annoying to have to
> open-code time and again. Therefore in patch #3, add a helper to do just
> that.
>
> - The DCB tool is built on top of libmnl. Several routines will be
> basically the same in DCB as they are currently in devlink. In patches
> #4-#6, extract them to a new module, mnl_utils, for easy reuse.
>
> - Much of DCB is built around arrays. A syntax similar to the iplink_vlan's
> ingress-qos-map / egress-qos-map is very handy for describing changes
> done to such arrays. Therefore in patch #7, extract a helper,
> parse_mapping(), which manages parsing of key-value arrays. In patch #8,
> fix a buglet in the helper, and in patch #9, extend it to allow setting
> of all array elements in one go.
>
> - In patch #10, add a skeleton of "dcb", which contains common helpers and
> dispatches to subtools for handling of individual objects. The skeleton
> is empty as of this patch.
>
> In patch #11, add "dcb_ets", a module for handling of specifically DCB
> ETS objects.
>
> The intention is to gradually add handlers for at least PFC, APP, peer
> configuration, buffers and rates.
>
> [1] https://github.com/Mellanox/mlnx-tools/tree/master/ofed_scripts
>
overall this looks really good to me. Thanks for taking the time to do
the refactoring.
prev parent reply other threads:[~2020-10-31 15:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 12:29 [PATCH iproute2-next v2 00/11] Add a tool for configuration of DCB Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 01/11] Unify batch processing across tools Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 02/11] lib: Add parse_one_of(), parse_on_off() Petr Machata
2020-10-31 15:37 ` David Ahern
2020-10-31 21:25 ` Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 03/11] lib: utils: Add print_on_off_bool() Petr Machata
2020-10-30 16:05 ` Stephen Hemminger
2020-10-31 21:24 ` Petr Machata
2020-10-31 15:38 ` David Ahern
2020-10-31 21:23 ` Petr Machata
2020-11-01 23:55 ` David Ahern
2020-11-02 6:37 ` Leon Romanovsky
2020-11-02 15:10 ` David Ahern
2020-11-02 23:05 ` Petr Machata
2020-11-03 6:24 ` Leon Romanovsky
2020-11-03 21:01 ` Petr Machata
2020-11-04 8:15 ` Leon Romanovsky
2020-11-05 20:59 ` Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 04/11] lib: Extract from devlink/mnlg a helper, mnlu_socket_open() Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 05/11] lib: Extract from devlink/mnlg a helper, mnlu_msg_prepare() Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 06/11] lib: Extract from devlink/mnlg a helper, mnlu_socket_recv_run() Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 07/11] lib: Extract from iplink_vlan a helper to parse key:value arrays Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 08/11] lib: parse_mapping: Update argc, argv on error Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 09/11] lib: parse_mapping: Recognize a keyword "all" Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 10/11] Add skeleton of a new tool, dcb Petr Machata
2020-10-30 12:29 ` [PATCH iproute2-next v2 11/11] dcb: Add a subtool for the DCB ETS object Petr Machata
2020-10-31 15:51 ` David Ahern [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0bdc221e-e9dc-347c-a2fe-40efe358da00@gmail.com \
--to=dsahern@gmail.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=me@pmachata.org \
--cc=mrv@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).