1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (C) 2024. Huawei Technologies Co., Ltd */
4 #include <bpf/bpf_helpers.h>
6 struct inner_map_type {
7 __uint(type, BPF_MAP_TYPE_ARRAY);
10 __uint(max_entries, 1);
11 } inner_map SEC(".maps");
14 __uint(type, BPF_MAP_TYPE_HASH_OF_MAPS);
17 __uint(max_entries, 2);
18 __array(values, struct inner_map_type);
19 } outer_htab_map SEC(".maps");
22 __uint(type, BPF_MAP_TYPE_HASH_OF_MAPS);
23 __uint(map_flags, BPF_F_NO_PREALLOC);
26 __uint(max_entries, 2);
27 __array(values, struct inner_map_type);
28 } outer_alloc_htab_map SEC(".maps");
30 char _license[] SEC("license") = "GPL";