Re: [PATCH v2 bpf-next 1/2] btf: separate btf creation and loading

2019-02-05 Thread Andrii Nakryiko
On Tue, Feb 5, 2019 at 7:03 PM Alexei Starovoitov wrote: > > On Tue, Feb 05, 2019 at 04:29:48PM -0800, Andrii Nakryiko wrote: > > This change splits out previous btf__new functionality of constructing > > struct btf and loading it into kernel into two: > > - btf__new() just creates and initializes

Re: [PATCH v2 bpf-next 1/2] btf: separate btf creation and loading

2019-02-05 Thread Alexei Starovoitov
On Tue, Feb 05, 2019 at 04:29:48PM -0800, Andrii Nakryiko wrote: > This change splits out previous btf__new functionality of constructing > struct btf and loading it into kernel into two: > - btf__new() just creates and initializes struct btf > - btf__load() attempts to load existing struct btf int

[PATCH v2 bpf-next 1/2] btf: separate btf creation and loading

2019-02-05 Thread Andrii Nakryiko
This change splits out previous btf__new functionality of constructing struct btf and loading it into kernel into two: - btf__new() just creates and initializes struct btf - btf__load() attempts to load existing struct btf into kernel btf__free will still close BTF fd, if it was ever loaded succes