Thread (47 messages) 47 messages, 6 authors, 2021-05-13

Re: [PATCH v2 bpf-next 4/6] bpftool: handle transformed static map names in BPF skeleton

From: Yonghong Song <hidden>
Date: 2021-04-23 23:00:05
Also in: bpf


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@kernel.org>
Acked-by: Yonghong Song <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help