All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] bpf: btf: print bpftool map data with btf
@ 2018-07-02 18:39 Okash Khawaja
  2018-07-02 18:39 ` [PATCH bpf-next v2 2/3] bpf: btf: add btf print functionality Okash Khawaja
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Okash Khawaja @ 2018-07-02 18:39 UTC (permalink / raw)
  To: Daniel Borkmann, Martin KaFai Lau, Alexei Starovoitov,
	Yonghong Song, Quentin Monnet, Jakub Kicinski, David S. Miller
  Cc: netdev, kernel-team, linux-kernel

Hi,

This is v2. There are two key changes which mostly affect patches 2 and 3.
First, we have two BTF outputs:

1. when -j or -p switches are supplied to a map command - this is json- and
backward- compatible
2. when neither of -j and -p is supplied - this makes no promises on json- or
backward- compatibility, and aimed for humans

Second, in addition to map dump command, map lookup command has also been
updated to print data with btf. The rules around -j and -p are same as above.

Here is a summary of changes in v2:

patch 1:
    - line continuation alignment fixes + other style fixes

patch 2:
    - introduce struct btf_dumper which contains context for btf_dumper operation
    - line continuation alignment fixes + other style fixes
    - fix SPDX licence comment style to be C++ style
    - reverse christmas tree style comments
    - in btf_dumper_array() ensure we end json_writer array in case of error

patch 3:
    - btf output for humans is shown when neither -j nor -p is supplied
    - when -j or -p are supplied, augment output with "formatted" object which shows btf data in json
    - added btf output to map lookup command also
    - declarations to follow reverse christmas tree style
    - error message grammar fix and remove full stop
    - line continuation alignment fixes + other style fixes
    - reorganise do_dump_btf() to remove goto and make it clearer
    - remove misleading comment about end of root json object
    - add comment to explain allocation btf buffer
    - brackets around else clause to harmonise with braces on if clause

Thanks,
Okash

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-07-07 18:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-02 18:39 [PATCH bpf-next v2 0/3] bpf: btf: print bpftool map data with btf Okash Khawaja
2018-07-02 18:39 ` [PATCH bpf-next v2 2/3] bpf: btf: add btf print functionality Okash Khawaja
2018-07-03  5:06   ` Jakub Kicinski
2018-07-03 21:46     ` Okash Khawaja
2018-07-03 22:23       ` Jakub Kicinski
2018-07-03 22:38         ` Jakub Kicinski
2018-07-03 23:33           ` Martin KaFai Lau
2018-07-07 13:30             ` Okash Khawaja
2018-07-07 18:49               ` Jakub Kicinski
2018-07-04 16:31         ` Okash Khawaja
2018-07-02 18:39 ` [PATCH bpf-next v2 3/3] bpf: btf: print map dump and lookup with btf info Okash Khawaja
2018-07-03  5:29   ` Jakub Kicinski
     [not found] ` <20180702191324.476855192@fb.com>
2018-07-03  4:07   ` [PATCH bpf-next v2 1/3] bpf: btf: export btf types and name by offset from lib Jakub Kicinski

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.