From: Daniel Borkmann <daniel@iogearbox•net>
To: Jakub Kicinski <jakub.kicinski@netronome•com>,
Alexei Starovoitov <alexei.starovoitov@gmail•com>
Cc: netdev@vger•kernel.org, oss-drivers@netronome•com,
David Beckett <david.beckett@netronome•com>
Subject: Re: [PATCH net-next v2 3/3] tools: bpftool: add documentation
Date: Tue, 03 Oct 2017 16:15:24 +0200 [thread overview]
Message-ID: <59D39B7C.8080205@iogearbox.net> (raw)
In-Reply-To: <20171002183509.76b2cc65@cakuba>
On 10/03/2017 03:35 AM, Jakub Kicinski wrote:
> On Mon, 2 Oct 2017 17:55:02 -0700, Alexei Starovoitov wrote:
>>> +EXAMPLES
>>> +========
>>> +**# bpftool prog show**
>>> +::
>>> +
>>> + 10: xdp name:some_prog tag 00:5a:3d:21:23:62:0c:8b
>>
>> could you please remove ':' in the output to match what
>> show_fdinfo and kallsyms do ?
Yep, iproute2 as well, so would be better indeed.
> Ack.
>
>>> + loaded_at:2024.771 uid:0
>>
>> may be translate that to something human readable?
>
> Oh yes, the code will print a proper date/time, I forgot to
> regenerate the doc :S
>
>>> + xlated:528B jited:370B memlock:4096B map_ids:10
>>> +
>>> +|
>>> +| **# bpftool prog dump xlated id 10 file /tmp/t**
>>> +| **# ls -l /tmp/t**
>>> +| -rw------- 1 root root 560 Jul 22 01:42 /tmp/t
>>> +
>>> +|
>>> +| **# mount -t bpf none /sys/fs/bpf/**
>>> +| **# bpftool prog pin id 10 /sys/fs/bpf/prog**
>>> +| **# bpftool prog dum jited pinned /sys/fs/bpf/prog**
>>> +
>>> +::
>>> +
>>> + push %rbp
>>> + mov %rsp,%rbp
>>> + sub $0x228,%rsp
>>> + sub $0x28,%rbp
>>> + mov %rbx,0x0(%rbp)
>>
>> imo too many steps to dump disasm output.
>> Can it print it if we just say:
>> bpftool prog dump jited id 10
>> and
>> dump xlated
>
> Yes those will work. This example kind of shows pinning and dumping at
> the some time. Perhaps that's ill advised.
>
>> will pretty print them as verifier output as well?
>
> We tried to use LLVM as a library for this but the interface is
> painfully unstable and it's a heavy dependency. The current thinking
> is to try to put the instruction printing code in some higher level
> library, but I would rather leave that as a follow up.
>
>> All that can be changed later. Thanks for the doc.
Fine with that as well, so:
Acked-by: Daniel Borkmann <daniel@iogearbox•net>
next prev parent reply other threads:[~2017-10-03 14:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 23:11 [PATCH net-next v2 0/3] tools: add bpftool Jakub Kicinski
2017-10-02 23:11 ` [PATCH net-next v2 1/3] tools: rename tools/net directory to tools/bpf Jakub Kicinski
2017-10-02 23:11 ` [PATCH net-next v2 2/3] tools: bpf: add bpftool Jakub Kicinski
2017-10-02 23:11 ` [PATCH net-next v2 3/3] tools: bpftool: add documentation Jakub Kicinski
2017-10-03 0:55 ` Alexei Starovoitov
2017-10-03 1:35 ` Jakub Kicinski
2017-10-03 4:29 ` Alexei Starovoitov
2017-10-03 15:39 ` David Ahern
2017-10-03 16:01 ` Daniel Borkmann
2017-10-03 16:09 ` David Ahern
2017-10-03 17:57 ` [RFC 1/2] bpf: move instruction printing into a separate file Jakub Kicinski
2017-10-03 17:57 ` [RFC 2/2] tools: bpftool: use the kernel's instruction printer Jakub Kicinski
2017-10-03 19:32 ` [RFC 1/2] bpf: move instruction printing into a separate file Daniel Borkmann
2017-10-03 20:14 ` Alexei Starovoitov
2017-10-04 0:20 ` [RFC] bpf: remove global verifier state Jakub Kicinski
2017-10-04 2:52 ` Alexei Starovoitov
2017-10-04 3:24 ` Eric Dumazet
2017-10-04 3:43 ` Alexei Starovoitov
2017-10-04 19:13 ` Daniel Borkmann
2017-10-04 21:57 ` Jakub Kicinski
2017-10-04 22:40 ` Alexei Starovoitov
2017-10-03 14:15 ` Daniel Borkmann [this message]
2017-10-03 20:19 ` [PATCH net-next v2 0/3] tools: add bpftool Arnaldo Carvalho de Melo
2017-10-04 0:48 ` Jakub Kicinski
2017-10-04 11:40 ` Arnaldo Carvalho de Melo
2017-10-04 4:33 ` David Miller
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=59D39B7C.8080205@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=alexei.starovoitov@gmail$(echo .)com \
--cc=david.beckett@netronome$(echo .)com \
--cc=jakub.kicinski@netronome$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=oss-drivers@netronome$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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