From: Okash Khawaja <osk@fb.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <kafai@fb.com>,
Alexei Starovoitov <ast@kernel.org>, Yonghong Song <yhs@fb.com>,
Quentin Monnet <quentin.monnet@netronome.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
"David S. Miller" <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <kernel-team@fb.com>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH bpf-next v2 0/3] bpf: btf: print bpftool map data with btf
Date: Mon, 2 Jul 2018 11:39:13 -0700 [thread overview]
Message-ID: <20180702183913.669030439@fb.com> (raw)
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
next reply other threads:[~2018-07-02 19:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 18:39 Okash Khawaja [this message]
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
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=20180702183913.669030439@fb.com \
--to=osk@fb.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=quentin.monnet@netronome.com \
--cc=yhs@fb.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