mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
bpf: libbpf: remove map name retry from bpf_create_map_xattr
Instead, check for a newly created caps.name bpf_object capability.
If kernel doesn't support names, don't specify the attribute.
See commit 23499442c3
("bpf: libbpf: retry map creation without
the name") for rationale.
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
47eff61777
commit
94cb310cfa
2 changed files with 3 additions and 11 deletions
|
@ -1211,7 +1211,8 @@ bpf_object__create_maps(struct bpf_object *obj)
|
|||
continue;
|
||||
}
|
||||
|
||||
create_attr.name = map->name;
|
||||
if (obj->caps.name)
|
||||
create_attr.name = map->name;
|
||||
create_attr.map_ifindex = map->map_ifindex;
|
||||
create_attr.map_type = def->type;
|
||||
create_attr.map_flags = def->map_flags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue