All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wangnan (F)" <wangnan0@huawei.com>
To: Joe Stringer <joe@ovn.org>, <acme@kernel.org>
Cc: <ast@fb.com>, <daniel@iogearbox.net>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin()
Date: Wed, 25 Jan 2017 09:06:19 +0800	[thread overview]
Message-ID: <921d83a9-aa44-acee-4fcf-dbc45cc0a66a@huawei.com> (raw)
In-Reply-To: <e24b0753-43ee-fad5-86c4-a3699caff05d@huawei.com>



On 2017/1/25 9:04, Wangnan (F) wrote:
>
>
> On 2017/1/23 9:11, Joe Stringer wrote:
>> Add a new API to pin a BPF program to the filesystem. The user can
>> specify the path full path within a BPF filesystem to pin the program.
>> Programs with multiple instances are pinned as 'foo', 'foo_1', 'foo_2',
>> and so on.
>>
>> Signed-off-by: Joe Stringer <joe@ovn.org>
>> ---
>> v2: Don't automount BPF filesystem
>>      Split program, map, object pinning into separate APIs and separate
>>      patches.
>> ---

[SNIP]

>> +int bpf_program__pin(struct bpf_program *prog, const char *path)
>
> In your next patch please let caller select one instance:
>
> int bpf_program__pin(struct bpf_program *prog, int instance, const 
> char *path)
> (please choose a better name)
>
> Then your can wrap it with another function to pin all instances, 
> implement
> naming schema (%s_%d) there.
>
> Then implement naming schema in bpf_object__pin like:
>
> %s/objectname_mapname
> %s/objectname_progname_%d
>

Is it possible to use directory tree instead?

%s/object/mapname
%s/object/prog/instance

Thank you.

  reply	other threads:[~2017-01-25  1:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  1:11 [PATCHv2 perf/core 0/7] Libbpf improvements Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 1/7] tools lib bpf: Fix map offsets in relocation Joe Stringer
2017-01-26 15:29   ` [tip:perf/core] " tip-bot for Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 2/7] tools lib bpf: Define prog_type fns with macro Joe Stringer
2017-01-26 15:30   ` [tip:perf/core] " tip-bot for Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 3/7] tools lib bpf: Add set/is helpers for all prog types Joe Stringer
2017-01-26 15:30   ` [tip:perf/core] " tip-bot for Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 4/7] tools lib bpf: Add libbpf_get_error() Joe Stringer
2017-01-26 15:31   ` [tip:perf/core] " tip-bot for Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() Joe Stringer
2017-01-25  1:04   ` Wangnan (F)
2017-01-25  1:06     ` Wangnan (F) [this message]
2017-01-25  1:16       ` Joe Stringer
2017-01-25  2:18         ` Wangnan (F)
2017-01-26 19:32           ` Arnaldo Carvalho de Melo
2017-01-26 19:43             ` Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 6/7] tools lib bpf: Add bpf_map__pin() Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 7/7] tools lib bpf: Add bpf_object__pin() Joe Stringer
2017-01-24 16:12 ` [PATCHv2 perf/core 0/7] Libbpf improvements Arnaldo Carvalho de Melo
2017-01-25  0:50   ` Joe Stringer

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=921d83a9-aa44-acee-4fcf-dbc45cc0a66a@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=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 \
    /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.