Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1566253
| From | "Wangnan (F)" <wangnan0@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() |
| Date | 2017-01-25 02:10 +0100 |
| Message-ID | <t3kg1-3qv-1@gated-at.bofh.it> (permalink) |
| References | <t2BsB-8iC-3@gated-at.bofh.it> <t2BsC-8iC-25@gated-at.bofh.it> <t3kg1-3qv-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv2 perf/core 0/7] Libbpf improvements Joe Stringer <joe@ovn.org> - 2017-01-23 02:20 +0100
[PATCHv2 perf/core 6/7] tools lib bpf: Add bpf_map__pin() Joe Stringer <joe@ovn.org> - 2017-01-23 02:20 +0100
[PATCHv2 perf/core 4/7] tools lib bpf: Add libbpf_get_error() Joe Stringer <joe@ovn.org> - 2017-01-23 02:20 +0100
[tip:perf/core] tools lib bpf: Add libbpf_get_error() tip-bot for Joe Stringer <tipbot@zytor.com> - 2017-01-26 16:40 +0100
[PATCHv2 perf/core 7/7] tools lib bpf: Add bpf_object__pin() Joe Stringer <joe@ovn.org> - 2017-01-23 02:20 +0100
[PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() Joe Stringer <joe@ovn.org> - 2017-01-23 02:20 +0100
Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() "Wangnan (F)" <wangnan0@huawei.com> - 2017-01-25 02:10 +0100
Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() Joe Stringer <joe@ovn.org> - 2017-01-25 02:20 +0100
Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() "Wangnan (F)" <wangnan0@huawei.com> - 2017-01-25 03:20 +0100
Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-26 20:40 +0100
Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() Joe Stringer <joe@ovn.org> - 2017-01-26 20:50 +0100
Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() "Wangnan (F)" <wangnan0@huawei.com> - 2017-01-25 02:10 +0100
[PATCHv2 perf/core 1/7] tools lib bpf: Fix map offsets in relocation Joe Stringer <joe@ovn.org> - 2017-01-23 02:20 +0100
[tip:perf/core] tools lib bpf: Fix map offsets in relocation tip-bot for Joe Stringer <tipbot@zytor.com> - 2017-01-26 16:40 +0100
[PATCHv2 perf/core 3/7] tools lib bpf: Add set/is helpers for all prog types Joe Stringer <joe@ovn.org> - 2017-01-23 02:20 +0100
[tip:perf/core] tools lib bpf: Add set/is helpers for all prog types tip-bot for Joe Stringer <tipbot@zytor.com> - 2017-01-26 16:40 +0100
[PATCHv2 perf/core 2/7] tools lib bpf: Define prog_type fns with macro Joe Stringer <joe@ovn.org> - 2017-01-23 02:20 +0100
[tip:perf/core] tools lib bpf: Define prog_type fns with macro tip-bot for Joe Stringer <tipbot@zytor.com> - 2017-01-26 16:40 +0100
Re: [PATCHv2 perf/core 0/7] Libbpf improvements Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-24 17:20 +0100
Re: [PATCHv2 perf/core 0/7] Libbpf improvements Joe Stringer <joe@ovn.org> - 2017-01-25 02:00 +0100
csiph-web