Thank you Jiri, that's great news.
Adding Marco D'Itri.
Marco, I wonder if you are OK with the rationale for libbpf packaging
from GH mirror? Can we proceed with switching Debian package as well
just like we discussed offline at ASG?
The bug report for Fedora: [1]
Thank you
[1] https://bugzilla.r
Replace lookup in (prog|map)_type_name arrays with
libbpf_(prog|map)_type_to_str helpers.
Use __MAX_BPF_(PROG|MAP)_TYPE enum values as loop bounds.
Signed-off-by: Julia Kartseva
---
tools/bpf/bpftool/feature.c | 47 ++
tools/bpf/bpftool/main.h| 33 ---
tools
Standardize string representation of attach types by putting commonly used
names to libbpf.
The attach_type to string mapping is taken from bpftool:
tools/bpf/bpftool/cgroup.c
tools/bpf/bpftool/prog.c
Signed-off-by: Julia Kartseva
---
tools/lib/bpf/libbpf.c | 50
Similar to prog_type to string mapping, standardize string representation
of map types by putting commonly used names to libbpf.
The map_type to string mapping is taken from bpftool:
tools/bpf/bpftool/map.c
Signed-off-by: Julia Kartseva
---
tools/lib/bpf/libbpf.c | 51
Standardize string representation of prog types by putting commonly used
names to libbpf.
The prog_type to string mapping is taken from bpftool:
tools/bpf/bpftool/main.h
Signed-off-by: Julia Kartseva
---
tools/lib/bpf/libbpf.c | 51
tools/lib/bpf
re of newly introduced helpers.
Julia Kartseva (10):
bpf: introduce __MAX_BPF_PROG_TYPE and __MAX_BPF_MAP_TYPE enum values
tools/bpf: sync bpf.h to tools/
tools/bpf: handle __MAX_BPF_(PROG|MAP)_TYPE in switch statements
tools/bpf: add libbpf_prog_type_(from|to)_str helpers
tools/bpf
Introduce __MAX_BPF_MAP_TYPE and __MAX_BPF_MAP_TYPE enum values.
Signed-off-by: Julia Kartseva
---
tools/include/uapi/linux/bpf.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 5d2fb183ee2d..9b681bb82211 100644
Add cases to switch statements in probe_load, bpf_prog_type__needs_kver
bpf_probe_map_type to fix enumeration value not handled in switch
compilation error.
prog_type_name array in bpftool/main.h doesn't have __MAX_BPF_PROG_TYPE
entity, same for map, so probe won't be called.
Signed-off
Change the test name after extending it with enum stringification
helpers.
Signed-off-by: Julia Kartseva
---
tools/testing/selftests/bpf/Makefile | 2 +-
.../bpf/test_section_and_type_names.c | 378 ++
.../selftests/bpf/test_section_names.c| 378
Replace lookup in `attach_type_strings` with
libbpf_attach_type_to_str helper for cgroup (cgroup.c)
and non-cgroup (prog.c) attach types.
Signed-off-by: Julia Kartseva
---
tools/bpf/bpftool/cgroup.c | 60 +-
tools/bpf/bpftool/prog.c | 20 +++--
2
Test bpf enum stringification helpers:
libbpf_(prog|map|attach)_type_(from|to)_str
Signed-off-by: Julia Kartseva
---
.../selftests/bpf/test_section_names.c| 149 +-
1 file changed, 147 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf
Similar to __MAX_BPF_ATTACH_TYPE identifying the number of elements in
bpf_attach_type enum, add tailing enum values __MAX_BPF_PROG_TYPE
and __MAX_BPF_MAP_TYPE to simplify e.g. iteration over enums values in
the case when new values are added.
Signed-off-by: Julia Kartseva
---
include/uapi
12 matches
Mail list logo