Re: [PATCH bpf-next 08/11] libbpf: support BTF dedup of split BTFs

2020-11-03 Thread Alexei Starovoitov
On Mon, Nov 02, 2020 at 10:27:20PM -0800, Andrii Nakryiko wrote: > On Mon, Nov 2, 2020 at 9:10 PM Alexei Starovoitov > wrote: > > > > On Wed, Oct 28, 2020 at 05:58:59PM -0700, Andrii Nakryiko wrote: > > > @@ -2942,6 +2948,13 @@ struct btf_dedup { > > > __u32 *hypot_list; > > > size_t h

Re: [PATCH bpf-next 08/11] libbpf: support BTF dedup of split BTFs

2020-11-03 Thread Song Liu
> On Nov 2, 2020, at 10:31 PM, Andrii Nakryiko > wrote: > > On Mon, Nov 2, 2020 at 9:59 PM Song Liu wrote: >> >> >> >>> On Nov 2, 2020, at 9:25 PM, Andrii Nakryiko >>> wrote: >>> >>> On Mon, Nov 2, 2020 at 6:49 PM Song Liu wrote: > On Oct 28, 2020, at 5:58 PM, An

Re: [PATCH bpf-next 08/11] libbpf: support BTF dedup of split BTFs

2020-11-02 Thread Andrii Nakryiko
On Mon, Nov 2, 2020 at 9:59 PM Song Liu wrote: > > > > > On Nov 2, 2020, at 9:25 PM, Andrii Nakryiko > > wrote: > > > > On Mon, Nov 2, 2020 at 6:49 PM Song Liu wrote: > >> > >> > >> > >>> On Oct 28, 2020, at 5:58 PM, Andrii Nakryiko wrote: > >>> > >>> Add support for deduplication split BTFs.

Re: [PATCH bpf-next 08/11] libbpf: support BTF dedup of split BTFs

2020-11-02 Thread Andrii Nakryiko
On Mon, Nov 2, 2020 at 9:10 PM Alexei Starovoitov wrote: > > On Wed, Oct 28, 2020 at 05:58:59PM -0700, Andrii Nakryiko wrote: > > @@ -2942,6 +2948,13 @@ struct btf_dedup { > > __u32 *hypot_list; > > size_t hypot_cnt; > > size_t hypot_cap; > > + /* Whether hypothethical mappin

Re: [PATCH bpf-next 08/11] libbpf: support BTF dedup of split BTFs

2020-11-02 Thread Song Liu
> On Nov 2, 2020, at 9:25 PM, Andrii Nakryiko wrote: > > On Mon, Nov 2, 2020 at 6:49 PM Song Liu wrote: >> >> >> >>> On Oct 28, 2020, at 5:58 PM, Andrii Nakryiko wrote: >>> >>> Add support for deduplication split BTFs. When deduplicating split BTF, base >>> BTF is considered to be immuta

Re: [PATCH bpf-next 08/11] libbpf: support BTF dedup of split BTFs

2020-11-02 Thread Andrii Nakryiko
On Mon, Nov 2, 2020 at 6:49 PM Song Liu wrote: > > > > > On Oct 28, 2020, at 5:58 PM, Andrii Nakryiko wrote: > > > > Add support for deduplication split BTFs. When deduplicating split BTF, base > > BTF is considered to be immutable and can't be modified or adjusted. 99% of > > BTF deduplication l

Re: [PATCH bpf-next 08/11] libbpf: support BTF dedup of split BTFs

2020-11-02 Thread Alexei Starovoitov
On Wed, Oct 28, 2020 at 05:58:59PM -0700, Andrii Nakryiko wrote: > @@ -2942,6 +2948,13 @@ struct btf_dedup { > __u32 *hypot_list; > size_t hypot_cnt; > size_t hypot_cap; > + /* Whether hypothethical mapping, if successful, would need to adjust > + * already canonicalized

Re: [PATCH bpf-next 08/11] libbpf: support BTF dedup of split BTFs

2020-11-02 Thread Song Liu
> On Oct 28, 2020, at 5:58 PM, Andrii Nakryiko wrote: > > Add support for deduplication split BTFs. When deduplicating split BTF, base > BTF is considered to be immutable and can't be modified or adjusted. 99% of > BTF deduplication logic is left intact (module some type numbering > adjustmen

[PATCH bpf-next 08/11] libbpf: support BTF dedup of split BTFs

2020-10-28 Thread Andrii Nakryiko
Add support for deduplication split BTFs. When deduplicating split BTF, base BTF is considered to be immutable and can't be modified or adjusted. 99% of BTF deduplication logic is left intact (module some type numbering adjustments). There are only two differences. First, each type in base BTF get