From: Stephen Hemminger <stephen@networkplumber.org>
To: Leon Romanovsky <leon@kernel.org>
Cc: Ivan Vecera <ivecera@redhat.com>,
netdev@vger.kernel.org, jiri@mellanox.com, arkadis@mellanox.com
Subject: Re: [PATCH iproute2 2/2] devlink: add batch command support
Date: Sun, 12 Nov 2017 16:16:50 -0800 [thread overview]
Message-ID: <20171112161650.355a927f@xeon-e3> (raw)
In-Reply-To: <20171110194735.GN18825@mtr-leonro.local>
[-- Attachment #1: Type: text/plain, Size: 2079 bytes --]
On Fri, 10 Nov 2017 21:47:35 +0200
Leon Romanovsky <leon@kernel.org> wrote:
> On Fri, Nov 10, 2017 at 08:10:43AM +0100, Ivan Vecera wrote:
> > On 10.11.2017 07:57, Leon Romanovsky wrote:
> > > On Fri, Nov 10, 2017 at 07:20:14AM +0100, Ivan Vecera wrote:
> > >> The patch adds support to batch devlink commands.
> > >>
> > >> Cc: Jiri Pirko <jiri@mellanox.com>
> > >> Cc: Arkadi Sharshevsky <arkadis@mellanox.com>
> > >> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> > >> ---
> > >> devlink/devlink.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++-------
> > >> man/man8/devlink.8 | 16 +++++++++++++
> > >> 2 files changed, 78 insertions(+), 8 deletions(-)
> > >>
> > >
> > > <..>
> > >
> > >> diff --git a/man/man8/devlink.8 b/man/man8/devlink.8
> > >> index a480766c..a975ef34 100644
> > >> --- a/man/man8/devlink.8
> > >> +++ b/man/man8/devlink.8
> > >> @@ -12,6 +12,12 @@ devlink \- Devlink tool
> > >> .sp
> > >>
> > >> .ti -8
> > >> +.B devlink
> > >> +.RB "[ " -force " ] "
> > >> +.BI "-batch " filename
> > >> +.sp
> > >> +
> > >> +.ti -8
> > >> .IR OBJECT " := { "
> > >> .BR dev " | " port " | " monitor " }"
> > >> .sp
> > >> @@ -32,6 +38,16 @@ Print the version of the
> > >> utility and exit.
> > >>
> > >> .TP
> > >> +.BR "\-b", " \-batch " <FILENAME>
> > >> +Read commands from provided file or standard input and invoke them.
> > >> +First failure will cause termination of devlink.
> > >
> > > It is worth to document the expected format of that file.
> > > And IMHO, it is better to have ability to load JSON fie which was
> > > generated by -j, instead of declaring new format/knob.
> > It's just a list of command-lines... like other utils (bridge,ip...)
>
> I'm implementing similar thing in RDMAtool (part of iproute2) and choose JSON
> approach, it is more user and script friendly.
>
If you want to do batch form rdmatool then it must take list of commands by default.
An additional option to take json input "rdmatool -j --batch..." would be good as well.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-11-13 0:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 6:20 [PATCH iproute2 0/2] add batch command support to devlink Ivan Vecera
2017-11-10 6:20 ` [PATCH iproute2 1/2] lib: make resolve_hosts variable common Ivan Vecera
2017-11-10 6:20 ` [PATCH iproute2 2/2] devlink: add batch command support Ivan Vecera
2017-11-10 6:57 ` Leon Romanovsky
2017-11-10 7:10 ` Ivan Vecera
2017-11-10 19:47 ` Leon Romanovsky
2017-11-12 5:06 ` Jiri Pirko
2017-11-12 8:19 ` Leon Romanovsky
2017-11-12 8:21 ` Jiri Pirko
2017-11-13 0:16 ` Stephen Hemminger [this message]
2017-11-13 8:59 ` Leon Romanovsky
2017-11-12 5:08 ` Jiri Pirko
2017-11-13 0:17 ` [PATCH iproute2 0/2] add batch command support to devlink Stephen Hemminger
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=20171112161650.355a927f@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=arkadis@mellanox.com \
--cc=ivecera@redhat.com \
--cc=jiri@mellanox.com \
--cc=leon@kernel.org \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.