mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roman Gushchin <guro@fb.com>
To: Quentin Monnet <quentin.monnet@netronome.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<kernel-team@fb.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>
Subject: Re: [PATCH bpf-next] bpftool: recognize BPF_PROG_TYPE_CGROUP_DEVICE programs
Date: Mon, 15 Jan 2018 19:49:58 +0000	[thread overview]
Message-ID: <20180115194952.GA14131@castle.DHCP.thefacebook.com> (raw)
In-Reply-To: <34c43a17-7832-413e-fea8-4ad0f80f1585@netronome.com>

On Mon, Jan 15, 2018 at 07:32:01PM +0000, Quentin Monnet wrote:
> 2018-01-15 19:16 UTC+0000 ~ Roman Gushchin <guro@fb.com>
> > Bpftool doesn't recognize BPF_PROG_TYPE_CGROUP_DEVICE programs,
> > so the prog show command prints the numeric type value:
> >
> > $ bpftool prog show
> > 1: type 15  name bpf_prog1  tag ac9f93dbfd6d9b74
> > 	loaded_at Jan 15/07:58  uid 0
> > 	xlated 96B  jited 105B  memlock 4096B
> >
> > This patch defines the corresponding textual representation:
> >
> > $ bpftool prog show
> > 1: cgroup_device  name bpf_prog1  tag ac9f93dbfd6d9b74
> > 	loaded_at Jan 15/07:58  uid 0
> > 	xlated 96B  jited 105B  memlock 4096B
> >
> > Signed-off-by: Roman Gushchin <guro@fb.com>
> > Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
> > Cc: Quentin Monnet <quentin.monnet@netronome.com>
> > Cc: Daniel Borkmann <daniel@iogearbox.net>
> > Cc: Alexei Starovoitov <ast@kernel.org>
> > ---
> >  tools/bpf/bpftool/prog.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
> > index c6a28be4665c..099e21cf1b5c 100644
> > --- a/tools/bpf/bpftool/prog.c
> > +++ b/tools/bpf/bpftool/prog.c
> > @@ -66,6 +66,7 @@ static const char * const prog_type_name[] = {
> >  	[BPF_PROG_TYPE_LWT_XMIT]	= "lwt_xmit",
> >  	[BPF_PROG_TYPE_SOCK_OPS]	= "sock_ops",
> >  	[BPF_PROG_TYPE_SK_SKB]		= "sk_skb",
> > +	[BPF_PROG_TYPE_CGROUP_DEVICE]	= "cgroup_device",
> >  };
> >  
> >  static void print_boot_time(__u64 nsecs, char *buf, unsigned int size)
> 
> Looks good, thanks Roman!
> Would you mind updating the map names as well? It seems the
> BPF_MAP_TYPE_CPUMAP is missing from the list in map.c.

Hello, Quentin!

Sure, I'll take a look.

Thanks!

  reply	other threads:[~2018-01-15 19:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 19:16 Roman Gushchin
2018-01-15 19:32 ` Quentin Monnet
2018-01-15 19:49   ` Roman Gushchin [this message]
2018-01-16  1:52     ` Daniel Borkmann
2018-01-19 14:17   ` Roman Gushchin
2018-01-19 14:37     ` Quentin Monnet
2018-01-19 22:19       ` Daniel Borkmann
2018-01-19 22:23     ` Jakub Kicinski
2018-01-15 19:42 ` 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=20180115194952.GA14131@castle.DHCP.thefacebook.com \
    --to=guro@fb.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=quentin.monnet@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

all inboxes | Powered by JetHome®