]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
libbpf: Add layout encoding support
authorAlan Maguire <alan.maguire@oracle.com>
Thu, 26 Mar 2026 14:54:39 +0000 (14:54 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 26 Mar 2026 20:53:56 +0000 (13:53 -0700)
commitd686d92c40803f255af162601d0db38db3efa7fb
treecbaa300abebb2e8d581339a3e2c658fde0c53d21
parent2ecbe53e0e991ce640478c552e564ff99043a29f
libbpf: Add layout encoding support

Support encoding of BTF layout data via btf__new_empty_opts().

Current supported opts are base_btf and add_layout.

Layout information is maintained in btf.c in the layouts[] array;
when BTF is created with the add_layout option it represents the
current view of supported BTF kinds.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260326145444.2076244-5-alan.maguire@oracle.com
tools/lib/bpf/btf.c
tools/lib/bpf/btf.h
tools/lib/bpf/libbpf.map