netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Joe Stringer <joe@ovn.org>
Cc: wangnan0@huawei.com, ast@fb.com, daniel@iogearbox.net,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCHv3 perf/core 0/6] Libbpf object pinning
Date: Mon, 30 Jan 2017 17:37:49 -0300	[thread overview]
Message-ID: <20170130203749.GH4546@kernel.org> (raw)
In-Reply-To: <20170126212001.14103-1-joe@ovn.org>

Em Thu, Jan 26, 2017 at 01:19:55PM -0800, Joe Stringer escreveu:
> This series adds pinning functionality for maps, programs, and objects.
> Library users may call bpf_map__pin(map, path) or bpf_program__pin(prog, path)
> to pin maps and programs separately, or use bpf_object__pin(obj, path) to
> pin all maps and programs from the BPF object to the path. The map and program
> variations require a path where it will be pinned in the filesystem,
> and the object variation will create named directories for each program with
> instances within, and mount the maps by name under the path.
> 
> For example, with the directory '/sys/fs/bpf/foo' and a BPF object which
> contains two instances of a program named 'bar', and a map named 'baz':
> /sys/fs/bpf/foo/bar/0
> /sys/fs/bpf/foo/bar/1
> /sys/fs/bpf/foo/baz

Thanks, applied, after some minor fixes.

- Arnaldo
 
> ---
> v3: Split out bpf_program__pin_instance().
>     Change the paths from PATH/{maps,progs}/foo to the above.
>     Drop the patches that were applied.
>     Add a perf test to check that pinning works.
> v2: Wang Nan provided improvements to patch 1.
>     Dropped patch 2 from v1.
>     Added acks for acked patches.
>     Split the bpf_obj__pin() to also provide map / program pinning APIs.
>     Allow users to provide full filesystem path (don't autodetect/mount BPFFS).
> v1: Initial post.
> 
> Joe Stringer (6):
>   tools lib bpf: Add BPF program pinning APIs.
>   tools lib bpf: Add bpf_map__pin()
>   tools lib bpf: Add bpf_object__pin()
>   tools perf util: Make rm_rf(path) argument const
>   tools lib api fs: Add bpf_fs filesystem detector
>   perf test: Add libbpf pinning test
> 
>  tools/lib/api/fs/fs.c  |  16 +++++
>  tools/lib/api/fs/fs.h  |   1 +
>  tools/lib/bpf/libbpf.c | 188 +++++++++++++++++++++++++++++++++++++++++++++++++
>  tools/lib/bpf/libbpf.h |   5 ++
>  tools/perf/tests/bpf.c |  42 ++++++++++-
>  tools/perf/util/util.c |   2 +-
>  tools/perf/util/util.h |   2 +-
>  7 files changed, 253 insertions(+), 3 deletions(-)
> 
> -- 
> 2.11.0

      parent reply	other threads:[~2017-01-30 20:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 21:19 [PATCHv3 perf/core 0/6] Libbpf object pinning Joe Stringer
2017-01-26 21:19 ` [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs Joe Stringer
2017-01-30 20:25   ` Arnaldo Carvalho de Melo
2017-01-30 20:28     ` Arnaldo Carvalho de Melo
2017-01-30 21:16       ` Joe Stringer
2017-01-31  0:58         ` Arnaldo Carvalho de Melo
2017-01-31 16:08           ` Arnaldo Carvalho de Melo
2017-01-31 16:13             ` Arnaldo Carvalho de Melo
2017-01-31 16:42               ` Arnaldo Carvalho de Melo
2017-01-26 21:19 ` [PATCHv3 perf/core 2/6] tools lib bpf: Add bpf_map__pin() Joe Stringer
2017-01-26 21:19 ` [PATCHv3 perf/core 3/6] tools lib bpf: Add bpf_object__pin() Joe Stringer
2017-01-26 21:19 ` [PATCHv3 perf/core 4/6] tools perf util: Make rm_rf(path) argument const Joe Stringer
2017-01-26 21:20 ` [PATCHv3 perf/core 5/6] tools lib api fs: Add bpf_fs filesystem detector Joe Stringer
2017-01-26 21:20 ` [PATCHv3 perf/core 6/6] perf test: Add libbpf pinning test Joe Stringer
2017-01-30 20:37 ` Arnaldo Carvalho de Melo [this message]

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=20170130203749.GH4546@kernel.org \
    --to=acme@kernel.org \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=joe@ovn.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wangnan0@huawei.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).