From: Jakub Kicinski <kubakici@wp.pl>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: xdp-newbies@vger.kernel.org, ast@fb.com,
Martin KaFai Lau <kafai@fb.com>,
Hannes Frederic Sowa <hannes@redhat.com>
Subject: Re: XDP/BPF C and python libraries?
Date: Sat, 22 Jul 2017 00:20:50 -0700 [thread overview]
Message-ID: <20170722002050.315717be@cakuba.netronome.com> (raw)
In-Reply-To: <20170721153743.31cd84a0@cakuba.netronome.com>
On Fri, 21 Jul 2017 15:37:43 -0700, Jakub Kicinski wrote:
> On Fri, 21 Jul 2017 12:22:14 +0200, Daniel Borkmann wrote:
> > Hi Jakub,
> >
> > On 07/21/2017 07:53 AM, Jakub Kicinski wrote:
> > > I think it's recommended to use bpffs, are there any tools for
> > > interacting with it?
> >
> > Only to name a few examples, cilium and the iproute2's BPF ELF
> > loader interact with it, and I think recently also bcc got support
> > for bpffs. From library side kernel's libbpf supports pinning into
> > bpffs as well. We could probably have a small tool utilizing libbpf
> > that sits under kernel tools/, though.
>
> Upon further reflection it dawned on me that I should probably build on
> top of Martin's work and utilize the prog/map ids. Martin, do you have
> any code (or plans to produce code :)) for listing/interrogating/
> prodding programs and maps via the new ABI?
I put together this very simple tool with iproute2-like syntax:
https://github.com/Netronome/bpf-tool
These are available subcommands:
bpf prog show
bpf map show
bpf map dump id MAP_ID
bpf map update id MAP_ID key BYTES value BYTES
bpf map lookup id MAP_ID key BYTES
bpf map delete id MAP_ID key BYTES
The plan is to add support for substituting "id MAP_ID" with "pinned
PATH".
I probably have a need to poke maps more randomly than people would
usually do, but I certainly enjoy the freedom of being able to load the
xdp kernel samples with iproute2 and then observe the values from CLI :)
I wonder what others think. Or maybe someone else has a similar tool,
but just haven't responded yet?
One thing which is not clear to me is how to get the association
between programs and maps? Would we need to extend
BPF_OBJ_GET_INFO_BY_FD to provide this info?
next prev parent reply other threads:[~2017-07-22 7:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 5:53 XDP/BPF C and python libraries? Jakub Kicinski
2017-07-21 10:22 ` Daniel Borkmann
2017-07-21 22:37 ` Jakub Kicinski
2017-07-22 7:20 ` Jakub Kicinski [this message]
2017-07-23 5:35 ` Y Song
2017-07-23 23:54 ` Jakub Kicinski
2017-07-24 0:27 ` David Ahern
2017-07-24 1:00 ` Jakub Kicinski
2017-08-04 22:20 ` David Ahern
2017-08-05 16:40 ` Jakub Kicinski
2017-08-05 19:59 ` 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=20170722002050.315717be@cakuba.netronome.com \
--to=kubakici@wp.pl \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=hannes@redhat.com \
--cc=kafai@fb.com \
--cc=xdp-newbies@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.