Debian Codegraph @

testdata/loader_nobtf.h

raw symbols SCIP
1 /* Legacy map definitions for loader.c (no BTF) */
2
3 #pragma once
4
5 #include "common.h"
6
7 struct bpf_map_def hash_map __section("maps") = {
8 .type = BPF_MAP_TYPE_HASH,
9 .key_size = sizeof(uint32_t),
10 .value_size = sizeof(uint64_t),
11 .max_entries = 1,
12 .map_flags = BPF_F_NO_PREALLOC,
13 };
14
15 struct bpf_map_def hash_map2 __section("maps") = {
16 .type = BPF_MAP_TYPE_HASH,
17 .key_size = sizeof(uint32_t),
18 .value_size = sizeof(uint64_t),
19 .max_entries = 2,
20 };
21
22 // key_size and value_size always need to be 4 bytes and are automatically set
23 // when the map is created if left at 0 in the ELF. Leave them at 0 for
24 // consistency with the BTF map definitions, which specify key and value types,
25 // causing sizes to be 0 in the MapSpec. This avoids special casing in tests.
26 struct bpf_map_def perf_event_array __section("maps") = {
27 .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY,
28 .max_entries = 4096,
29 };