Re: [PATCH bpf-next 7/9] libbpf: add BTF writing APIs

2020-09-25 Thread Andrii Nakryiko
On Fri, Sep 25, 2020 at 8:37 AM Alexei Starovoitov wrote: > > On 9/24/20 11:21 PM, Andrii Nakryiko wrote: > > On Thu, Sep 24, 2020 at 8:55 PM Alexei Starovoitov > > wrote: > >> > >> On Wed, Sep 23, 2020 at 08:54:34AM -0700, Andrii Nakryiko wrote: > >>> Add APIs for appending new BTF types at the

Re: [PATCH bpf-next 7/9] libbpf: add BTF writing APIs

2020-09-25 Thread Alexei Starovoitov
On 9/24/20 11:21 PM, Andrii Nakryiko wrote: On Thu, Sep 24, 2020 at 8:55 PM Alexei Starovoitov wrote: On Wed, Sep 23, 2020 at 08:54:34AM -0700, Andrii Nakryiko wrote: Add APIs for appending new BTF types at the end of BTF object. Each BTF kind has either one API of the form btf__append_(). F

Re: [PATCH bpf-next 7/9] libbpf: add BTF writing APIs

2020-09-24 Thread Andrii Nakryiko
On Thu, Sep 24, 2020 at 8:55 PM Alexei Starovoitov wrote: > > On Wed, Sep 23, 2020 at 08:54:34AM -0700, Andrii Nakryiko wrote: > > Add APIs for appending new BTF types at the end of BTF object. > > > > Each BTF kind has either one API of the form btf__append_(). For types > > that have variable am

Re: [PATCH bpf-next 7/9] libbpf: add BTF writing APIs

2020-09-24 Thread Alexei Starovoitov
On Wed, Sep 23, 2020 at 08:54:34AM -0700, Andrii Nakryiko wrote: > Add APIs for appending new BTF types at the end of BTF object. > > Each BTF kind has either one API of the form btf__append_(). For types > that have variable amount of additional items (struct/union, enum, func_proto, > datasec),

RE: [PATCH bpf-next 7/9] libbpf: add BTF writing APIs

2020-09-24 Thread John Fastabend
Andrii Nakryiko wrote: > Add APIs for appending new BTF types at the end of BTF object. > > Each BTF kind has either one API of the form btf__append_(). For types > that have variable amount of additional items (struct/union, enum, func_proto, > datasec), additional API is provided to emit each su

[PATCH bpf-next 7/9] libbpf: add BTF writing APIs

2020-09-23 Thread Andrii Nakryiko
Add APIs for appending new BTF types at the end of BTF object. Each BTF kind has either one API of the form btf__append_(). For types that have variable amount of additional items (struct/union, enum, func_proto, datasec), additional API is provided to emit each such item. E.g., for emitting a str