On 1/17/2024 9:06 PM, Andrey Grafin wrote: > This patch allows to auto create BPF_MAP_TYPE_ARRAY_OF_MAPS and > BPF_MAP_TYPE_HASH_OF_MAPS with values of BPF_MAP_TYPE_PERF_EVENT_ARRAY > by bpf_object__load(). > > Previous behaviour created a zero filled btf_map_def for inner maps and > tried to use it for a map creation but the linux kernel forbids to create > a BPF_MAP_TYPE_PERF_EVENT_ARRAY map with max_entries=0. > > Fixes: 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map support") > Signed-off-by: Andrey Grafin <conquistador@xxxxxxxxxxxxxx> Acked-by: Hou Tao <houtao1@xxxxxxxxxx>