On Sun, Nov 12, 2017 at 04:16:50PM -0800, Stephen Hemminger wrote:
> On Fri, 10 Nov 2017 21:47:35 +0200
> Leon Romanovsky <l...@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 <j...@mellanox.com>
> > > >> Cc: Arkadi Sharshevsky <arka...@mellanox.com>
> > > >> Signed-off-by: Ivan Vecera <ivec...@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.
>

I'll do.

Thanks

>


Attachment: signature.asc
Description: PGP signature

Reply via email to