Commit cbef91de authored by Anton Protopopov's avatar Anton Protopopov Committed by Alexei Starovoitov
Browse files

libbpf: Recognize insn_array map type



Teach libbpf about the existence of the new instruction array map.

Signed-off-by: default avatarAnton Protopopov <a.s.protopopov@gmail.com>
Link: https://lore.kernel.org/r/20251105090410.1250500-4-a.s.protopopov@gmail.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 18a187bf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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[] = {
+4 −0
Original line number Diff line number Diff line
@@ -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;