On 4/23/21 11:53 AM, Andrii Nakryiko wrote:
Static maps will be renamed according to the same rules as global variables
global => static
(<obj_name>..<map_name>) during static linking. This breaks current BPF skeleton logic that uses normal non-internal maps' names as is. Instead, do the same map identifier sanitization as is done for global variables, turning
global => static
static maps into <obj_name>__<map_name> fields in BPF skeleton. Their original names with '..' separator are preserved by libbpf and submitted as is into the kernel. As well as they can be looked up using their unsanitized name with using bpf_object__find_map_by_name() API. There are no breaking changes concerns, similarly to static variable renames, because this renaming happens only during static linking. Plus static maps never really worked and thus were never used in practice. Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
Acked-by: Yonghong Song <yhs@xxxxxx>