]> git.baikalelectronics.ru Git - kernel.git/commit
tools/bpftool: Move map/prog parsing logic into common
authorAndrii Nakryiko <andriin@fb.com>
Fri, 19 Jun 2020 23:16:58 +0000 (16:16 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Jun 2020 00:01:48 +0000 (17:01 -0700)
commit07e731b72961dfd88d992ae8b16461a9a38970e5
tree97b32b3d93bb6b56b76a5ec1846bafcf887efaf6
parent1bf186e284499eea3ca59183249daf4f785b5db0
tools/bpftool: Move map/prog parsing logic into common

Move functions that parse map and prog by id/tag/name/etc outside of
map.c/prog.c, respectively. These functions are used outside of those files
and are generic enough to be in common. This also makes heavy-weight map.c and
prog.c more decoupled from the rest of bpftool files and facilitates more
lightweight bootstrap bpftool variant.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200619231703.738941-5-andriin@fb.com
tools/bpf/bpftool/common.c
tools/bpf/bpftool/main.h
tools/bpf/bpftool/map.c
tools/bpf/bpftool/prog.c