From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH bpf-next v2 1/3] bpf: btf: export btf types and name by offset from lib Date: Mon, 2 Jul 2018 21:07:29 -0700 Message-ID: <20180702210729.69cfb63d@cakuba.netronome.com> References: <20180702183913.669030439@fb.com> <20180702191324.476855192@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Daniel Borkmann , Martin KaFai Lau , Alexei Starovoitov , Yonghong Song , "Quentin Monnet" , "David S. Miller" , , , , Song Liu To: Okash Khawaja Return-path: In-Reply-To: <20180702191324.476855192@fb.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Mon, 2 Jul 2018 11:39:14 -0700, Okash Khawaja wrote: > --- a/tools/lib/bpf/btf.h > +++ b/tools/lib/bpf/btf.h > @@ -17,6 +17,9 @@ void btf__free(struct btf *btf); > struct btf *btf__new(uint8_t *data, uint32_t size, btf_print_fn_t err_log); > int32_t btf__find_by_name(const struct btf *btf, const char *type_name); > int64_t btf__resolve_size(const struct btf *btf, uint32_t type_id); > +int32_t btf__resolve_type(const struct btf *btf, uint32_t type_id); > int btf__fd(const struct btf *btf); > +const char *btf__name_by_offset(const struct btf *btf, uint32_t offset); > +const struct btf_type *btf__type_by_id(const struct btf *btf, uint32_t type_id); Why is BTF code using stdint types? libbpf used to follow the kernel coding style AFA int types go.