1 // SPDX-License-Identifier: GPL-2.0-only
4 #include <bpf/bpf_helpers.h>
7 __uint(type, BPF_MAP_TYPE_ARRAY);
8 __uint(max_entries, 5);
11 } inner_map1 SEC(".maps");
14 __uint(type, BPF_MAP_TYPE_HASH_OF_MAPS);
15 __uint(max_entries, 3);
17 __array(values, struct inner_map);
18 } outer_map1 SEC(".maps") = {
24 SEC("raw_tp/sys_enter")
25 int handle__sys_enter(void *ctx)
27 int outer_key = 2, inner_key = 3;
31 map = bpf_map_lookup_elem(&outer_map1, &outer_key);
35 val = bpf_map_lookup_elem(map, &inner_key);
45 char _license[] SEC("license") = "GPL";