Re: [PATCH bpf-next] [tools/bpf] add bpffs multi-dimensional array tests in test_btf

2019-03-29 Thread Alexei Starovoitov
On Thu, Mar 28, 2019 at 10:32 PM Yonghong Song wrote: > > For multiple dimensional arrays like below, > int a[2][3] > both llvm and pahole generated one BTF_KIND_ARRAY type like > . element_type: int > . index_type: unsigned int > . number of elements: 6 > > Such a collapsed BTF_KIND_ARRAY

[PATCH bpf-next] [tools/bpf] add bpffs multi-dimensional array tests in test_btf

2019-03-28 Thread Yonghong Song
For multiple dimensional arrays like below, int a[2][3] both llvm and pahole generated one BTF_KIND_ARRAY type like . element_type: int . index_type: unsigned int . number of elements: 6 Such a collapsed BTF_KIND_ARRAY type will cause the divergence in BTF vs. the user code. In the compile