netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Jakub Kicinski <jakub.kicinski@netronome.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, 3 Oct 2017 09:09:24 -0700	[thread overview]
Message-ID: <e66f1c26-b769-a9dc-ec69-7fa1f138e614@gmail.com> (raw)
In-Reply-To: <59D3B456.4020209@iogearbox.net>

On 10/3/17 9:01 AM, Daniel Borkmann wrote:
> On 10/03/2017 05:39 PM, David Ahern wrote:
>> On 10/2/17 9:29 PM, Alexei Starovoitov wrote:
>>> On Mon, Oct 02, 2017 at 06:35:09PM -0700, Jakub Kicinski wrote:
>>>>> 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.
>>>
>>> follow up, of course.
>>> Not depending on llvm is must have for this tool.
>>> I think we need tiny and simple tools first.
>>> Since you're using gpl+bsd license for this tool I think
>>> it would be fine to copy-paste verifier's pretty print code into it.
>>
>> I have done that including integrating it into bpf-tool.
> 
> Great, to avoid letting the pretty print code become stale,
> could the printer be ripped out of the verifier into its own
> file or header under kernel/bpf/ such that it can be used from
> kernel but also integrated from bpftool compilation? There's
> likely not much kernel specifics in there anyway, wdyt?

The pretty print code I have is based on the verifier code from
February. At this point I forget all of the changes I made to it in the
past 7 months.

I agree that it would be best to try to pull the verifier code into a
separate file for easier re-use and keeping the tool up to date.

  reply	other threads:[~2017-10-03 16:09 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 [this message]
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       ` [PATCH net-next v2 3/3] tools: bpftool: add documentation Daniel Borkmann
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=e66f1c26-b769-a9dc-ec69-7fa1f138e614@gmail.com \
    --to=dsahern@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=david.beckett@netronome.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@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;
as well as URLs for NNTP newsgroup(s).