Messages in this thread Patch in this message | | | Date | Sat, 26 Nov 2016 09:11:16 -0800 | From | Alexei Starovoitov <> | Subject | Re: [PATCH v3 02/30] tools lib bpf: Add private field for bpf_object |
| |
On Sat, Nov 26, 2016 at 07:03:26AM +0000, Wang Nan wrote: > Similar to other classes defined in libbpf.h (map and program), allow > 'object' class has its own private data. > > Signed-off-by: Wang Nan <wangnan0@huawei.com> > Cc: Alexei Starovoitov <ast@fb.com> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > Cc: Li Zefan <lizefan@huawei.com> > --- > tools/lib/bpf/libbpf.c | 23 +++++++++++++++++++++++ > tools/lib/bpf/libbpf.h | 5 +++++ > 2 files changed, 28 insertions(+) > > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c > index 96a2b2f..866d5cd 100644 > --- a/tools/lib/bpf/libbpf.c > +++ b/tools/lib/bpf/libbpf.c > @@ -229,6 +229,10 @@ struct bpf_object { > * all objects. > */ > struct list_head list; > + > + void *priv; > + bpf_object_clear_priv_t clear_priv; > + > char path[]; > };
Acked-by: Alexei Starovoitov <ast@kernel.org>
| |