All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: dsahern@gmail.com, alexei.starovoitov@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation
Date: Wed, 18 Jul 2018 11:13:37 -0700	[thread overview]
Message-ID: <20180718111337.165cfd5f@cakuba.lan> (raw)
In-Reply-To: <f0406f6a-ef26-5fe0-1fb4-1eda676743f5@iogearbox.net>

On Wed, 18 Jul 2018 11:33:22 +0200, Daniel Borkmann wrote:
> On 07/18/2018 10:42 AM, Daniel Borkmann wrote:
> > On 07/18/2018 02:27 AM, Jakub Kicinski wrote:  
> >> On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote:  
> >>>   # bpftool map dump id 386
> >>>    [{
> >>>         "key": 0,
> >>>         "value": {
> >>>             "": {
> >>>                 "value": 0,
> >>>                 "ifindex": 0,
> >>>                 "mac": []
> >>>             }
> >>>         }
> >>>     },{
> >>>         "key": 1,
> >>>         "value": {
> >>>             "": {
> >>>                 "value": 0,
> >>>                 "ifindex": 0,
> >>>                 "mac": []
> >>>             }
> >>>         }
> >>>     },{
> >>>   [...]  
> >>
> >> Ugh, the empty keys ("") look worrying, we should probably improve
> >> handling of anonymous structs in bpftool :S  
> > 
> > Yeah agree, I think it would be nice to see a more pahole style dump
> > where we have types and member names along with the value as otherwise
> > it might be a bit confusing.  
> 
> Another feature that would be super useful imho would be in the /single/
> map view e.g. 'bpftool map show id 123' to have a detailed BTF key+value
> type dump, so in addition to the basic map info we show pahole like info
> of the structs with length/offsets.

That sounds good!  We could also consider adding a btf object and
commands to interrogate BTF types in the kernel in general..  Perhaps
then we could add something like bpftool btf describe map id 123.

Having the single map view show more information seems interesting, but
I wonder if it could be surprising.  Is there precedent for such
behaviour?

  reply	other threads:[~2018-07-18 18:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17 23:31 [PATCH iproute2 0/5] Various BPF improvements Daniel Borkmann
2018-07-17 23:31 ` [PATCH iproute2 1/5] bpf: import btf uapi kernel header Daniel Borkmann
2018-07-17 23:31 ` [PATCH iproute2 2/5] bpf: move bpf_elf_map fixup notification under verbose Daniel Borkmann
2018-07-18  0:24   ` Jakub Kicinski
2018-07-17 23:31 ` [PATCH iproute2 3/5] bpf: remove strict dependency on af_alg Daniel Borkmann
2018-07-17 23:31 ` [PATCH iproute2 4/5] bpf: implement bpf to bpf calls support Daniel Borkmann
2018-07-17 23:31 ` [PATCH iproute2 5/5] bpf: implement btf handling and map annotation Daniel Borkmann
2018-07-18  0:27   ` Jakub Kicinski
2018-07-18  8:42     ` Daniel Borkmann
2018-07-18  9:33       ` Daniel Borkmann
2018-07-18 18:13         ` Jakub Kicinski [this message]
2018-07-19  0:11           ` Martin KaFai Lau
2018-07-19 15:43             ` Daniel Borkmann
2018-07-19 16:37               ` Martin KaFai Lau
2018-07-18 23:52     ` Martin KaFai Lau
2018-07-19  1:01       ` Jakub Kicinski
2018-07-18  2:43 ` [PATCH iproute2 0/5] Various BPF improvements David Ahern

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=20180718111337.165cfd5f@cakuba.lan \
    --to=jakub.kicinski@netronome.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=dsahern@gmail.com \
    --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.