]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Add enum64 parsing and new enum64 public API
authorYonghong Song <yhs@fb.com>
Tue, 7 Jun 2022 06:26:21 +0000 (23:26 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 7 Jun 2022 17:20:43 +0000 (10:20 -0700)
commitfbf39c3a4ea2302d3459c335282930fff5fcc81b
treece814a4d6cdd6538fa7c45f5927da6fa93f78d9f
parentc0329b5dc4a1d9f5497e51f9da8fcab2c4894c02
libbpf: Add enum64 parsing and new enum64 public API

Add enum64 parsing support and two new enum64 public APIs:
  btf__add_enum64
  btf__add_enum64_value

Also add support of signedness for BTF_KIND_ENUM. The
BTF_KIND_ENUM API signatures are not changed. The signedness
will be changed from unsigned to signed if btf__add_enum_value()
finds any negative values.

Acked-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20220607062621.3719391-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/btf.c
tools/lib/bpf/btf.h
tools/lib/bpf/libbpf.map