Files
libbpf/src
Hangbin Liu 3db7585378 libbpf: Add names for auxiliary maps
The bpftool self-created maps can appear in final map show output due to
deferred removal in kernel. These maps don't have a name, which would make
users confused about where it comes from.

With a libbpf_ prefix name, users could know who created these maps.
It also could make some tests (like test_offload.py, which skip base maps
without names as a workaround) filter them out.

Kernel adds bpf prog/map name support in the same merge
commit fadad670a8ab ("Merge branch 'bpf-extend-info'"). So we can also use
kernel_supports(NULL, FEAT_PROG_NAME) to check if kernel supports map name.

As discussed [1], Let's make bpf_map_create accept non-null
name string, and silently ignore the name if kernel doesn't support.

  [1] https://lore.kernel.org/bpf/CAEf4BzYL1TQwo1231s83pjTdFPk9XWWhfZC5=KzkU-VO0k=0Ug@mail.gmail.com/

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220811034020.529685-1-liuhangbin@gmail.com
2022-08-18 15:29:04 -07:00
..
2022-08-18 15:29:04 -07:00
2022-07-31 16:45:48 -07:00
2022-07-03 20:23:34 -07:00
2022-07-03 20:23:34 -07:00
2022-08-18 15:29:04 -07:00
2022-07-31 16:45:48 -07:00
2022-07-03 20:23:34 -07:00
2022-07-03 20:23:34 -07:00
2018-10-09 21:56:40 -07:00
2021-10-06 14:40:18 -07:00