]> 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)
commit014da4e4a8c42275f4ad209ade1d276e63a4b686
treeefee2fdb07ac80e8b2019def78b2cd0ebf2f12b0
parent303c9aec9f90e5d75c1227c87bf3f8b2e5c383d1
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