On Tue, May 17, 2022 at 8:51 PM Dave Marchevsky <davemarchevsky@xxxxxx> wrote: > maps increases, though. > > Note that the test programs need to split task_storage_get calls across > multiple programs to work around the verifier's MAX_USED_MAPS > limitations. ... > +++ b/tools/testing/selftests/bpf/progs/local_storage_bench.h > @@ -0,0 +1,69 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* Copyright (c) 2022 Meta Platforms, Inc. and affiliates. */ > + > +struct { > + __uint(type, BPF_MAP_TYPE_ARRAY_OF_MAPS); > + __uint(max_entries, 1000); > + __type(key, int); > + __type(value, int); > +} array_of_maps SEC(".maps"); > + > +long important_hits; > +long hits; > + > +#ifdef LOOKUP_HASHMAP > +static int do_lookup(unsigned int elem, struct task_struct *task /* unused */) > +{ > + void *map; > + int zero = 0; > + > + map = bpf_map_lookup_elem(&array_of_maps, &elem); > + if (!map) > + return -1; > + > + bpf_map_lookup_elem(map, &zero); > + __sync_add_and_fetch(&hits, 1); > + if (!elem) > + __sync_add_and_fetch(&important_hits, 1); > + return 0; > +} This prog accesses only two maps: array_of_maps and global data (hidden array map). Where do you see it's reaching MAX_USED_MAPS limit ?