netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: netdev@vger.kernel.org, daniel@iogearbox.net,
	davem@davemloft.net, hannes@stressinduktion.org,
	dsahern@gmail.com, oss-drivers@netronome.com
Subject: Re: [PATCH net-next 2/2] tools: bpf: add bpftool
Date: Wed, 27 Sep 2017 00:02:08 +0100	[thread overview]
Message-ID: <20170927000208.4396dfb7@cakuba> (raw)
In-Reply-To: <20170926222405.nq23enzudbjklczb@ast-mbp>

On Tue, 26 Sep 2017 15:24:06 -0700, Alexei Starovoitov wrote:
> On Tue, Sep 26, 2017 at 08:35:22AM -0700, Jakub Kicinski wrote:
> > Add a simple tool for querying and updating BPF objects on the system.
> > 
> > Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> > Reviewed-by: Simon Horman <simon.horman@netronome.com>
> > ---
> >  tools/bpf/Makefile             |  18 +-
> >  tools/bpf/bpftool/Makefile     |  80 +++++
> >  tools/bpf/bpftool/common.c     | 214 ++++++++++++
> >  tools/bpf/bpftool/jit_disasm.c |  83 +++++
> >  tools/bpf/bpftool/main.c       | 212 ++++++++++++
> >  tools/bpf/bpftool/main.h       |  99 ++++++
> >  tools/bpf/bpftool/map.c        | 742 +++++++++++++++++++++++++++++++++++++++++
> >  tools/bpf/bpftool/prog.c       | 392 ++++++++++++++++++++++
> >  8 files changed, 1837 insertions(+), 3 deletions(-)  
> ...
> > +static int do_help(int argc, char **argv)
> > +{
> > +	fprintf(stderr,
> > +		"Usage: %s %s show   [MAP]\n"
> > +		"       %s %s dump    MAP\n"
> > +		"       %s %s update  MAP  key BYTES value VALUE [UPDATE_FLAGS]\n"
> > +		"       %s %s lookup  MAP  key BYTES\n"
> > +		"       %s %s getnext MAP [key BYTES]\n"
> > +		"       %s %s delete  MAP  key BYTES\n"
> > +		"       %s %s pin     MAP  FILE\n"
> > +		"       %s %s help\n"
> > +		"\n"
> > +		"       MAP := { id MAP_ID | pinned FILE }\n"
> > +		"       " HELP_SPEC_PROGRAM "\n"
> > +		"       VALUE := { BYTES | MAP | PROG }\n"
> > +		"       UPDATE_FLAGS := { any | exist | noexist }\n"
> > +		"",  
> 
> overall looks good to me, but still difficult to grasp how to use it.
> Can you add README with example usage and expected output?

I have a README on GitHub, but I was thinking about perhaps writing a
proper man page?  Do you prefer one over the other?

> Acked-by: Alexei Starovoitov <ast@kernel.org>

Thanks!

> You also realize that you're signing up maintaining this tool, right? ;)

Yes :)

  reply	other threads:[~2017-09-26 23:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26 15:35 [PATCH net-next 0/2] tools: add bpftool Jakub Kicinski
2017-09-26 15:35 ` [PATCH net-next 1/2] tools: rename tools/net directory to tools/bpf Jakub Kicinski
2017-09-26 21:04   ` Daniel Borkmann
2017-09-26 22:19   ` Alexei Starovoitov
2017-09-26 15:35 ` [PATCH net-next 2/2] tools: bpf: add bpftool Jakub Kicinski
2017-09-26 21:06   ` Daniel Borkmann
2017-09-26 22:24   ` Alexei Starovoitov
2017-09-26 23:02     ` Jakub Kicinski [this message]
2017-09-27 10:45       ` Jesper Dangaard Brouer
2017-09-27 10:55         ` Daniel Borkmann
2017-09-27 10:57         ` Jakub Kicinski
2017-09-27 11:19           ` Jesper Dangaard Brouer
2017-09-27 11:49             ` Markus Heiser
2017-09-28 13:59   ` Jakub Kicinski
2017-09-28 15:48     ` David Miller
2017-09-26 23:32 ` [PATCH net-next 0/2] tools: " David Ahern
2017-09-27  0:44   ` Jakub Kicinski

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=20170927000208.4396dfb7@cakuba \
    --to=jakub.kicinski@netronome.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    /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).