]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Factor out common operations in BTF writing APIs
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 5 Nov 2020 04:33:51 +0000 (20:33 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 6 Nov 2020 02:37:30 +0000 (18:37 -0800)
commit5acf208d6db34b7d9c1b634e71f2f829c68a7310
treeefee2fdb07ac80e8b2019def78b2cd0ebf2f12b0
parentfcc7ab70a48e51541f30a862619668254a898eb7
libbpf: Factor out common operations in BTF writing APIs

Factor out commiting of appended type data. Also extract fetching the very
last type in the BTF (to append members to). These two operations are common
across many APIs and will be easier to refactor with split BTF, if they are
extracted into a single place.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20201105043402.2530976-2-andrii@kernel.org
tools/lib/bpf/btf.c