Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1530690

Re: [PATCH v3 02/30] tools lib bpf: Add private field for bpf_object

From Alexei Starovoitov <alexei.starovoitov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 02/30] tools lib bpf: Add private field for bpf_object
Date 2016-11-26 18:20 +0100
Message-ID <sHONQ-11D-7@gated-at.bofh.it> (permalink)
References <sHFhv-3nx-5@gated-at.bofh.it> <sHFhw-3nx-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 02/30] tools lib bpf: Add private field for bpf_object Wang Nan <wangnan0@huawei.com> - 2016-11-26 08:10 +0100
  Re: [PATCH v3 02/30] tools lib bpf: Add private field for bpf_object Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-11-26 18:20 +0100
  [tip:perf/core] tools lib bpf: Add private field for bpf_object tip-bot for Wang Nan <tipbot@zytor.com> - 2016-12-02 11:40 +0100

csiph-web