mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-22 09:19:06 +08:00
libbpf: Recognize insn_array map type
Teach libbpf about the existence of the new instruction array map. Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com> Link: https://lore.kernel.org/r/20251105090410.1250500-4-a.s.protopopov@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Andrii Nakryiko
parent
9d159773c5
commit
349b78117b
@@ -190,6 +190,7 @@ static const char * const map_type_name[] = {
|
||||
[BPF_MAP_TYPE_USER_RINGBUF] = "user_ringbuf",
|
||||
[BPF_MAP_TYPE_CGRP_STORAGE] = "cgrp_storage",
|
||||
[BPF_MAP_TYPE_ARENA] = "arena",
|
||||
[BPF_MAP_TYPE_INSN_ARRAY] = "insn_array",
|
||||
};
|
||||
|
||||
static const char * const prog_type_name[] = {
|
||||
|
||||
@@ -364,6 +364,10 @@ static int probe_map_create(enum bpf_map_type map_type)
|
||||
case BPF_MAP_TYPE_SOCKHASH:
|
||||
case BPF_MAP_TYPE_REUSEPORT_SOCKARRAY:
|
||||
break;
|
||||
case BPF_MAP_TYPE_INSN_ARRAY:
|
||||
key_size = sizeof(__u32);
|
||||
value_size = sizeof(struct bpf_insn_array_value);
|
||||
break;
|
||||
case BPF_MAP_TYPE_UNSPEC:
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
Reference in New Issue
Block a user