6 'maps' is a generic storage of different types for sharing data between kernel
9 The maps are accessed from user space via BPF syscall, which has commands:
11 - create a map with given type and attributes
12 ``map_fd = bpf(BPF_MAP_CREATE, union bpf_attr *attr, u32 size)``
13 using attr->map_type, attr->key_size, attr->value_size, attr->max_entries
14 returns process-local file descriptor or negative error
16 - lookup key in a given map
17 ``err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size)``
18 using attr->map_fd, attr->key, attr->value
19 returns zero and stores found elem into value or negative error
21 - create or update key/value pair in a given map
22 ``err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size)``
23 using attr->map_fd, attr->key, attr->value
24 returns zero or negative error
26 - find and delete element by key in a given map
27 ``err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size)``
28 using attr->map_fd, attr->key
30 - to delete map: close(fd)
31 Exiting process will delete maps automatically
33 userspace programs use this syscall to create/access maps that eBPF programs
34 are concurrently updating.
36 maps can have different types: hash, array, bloom filter, radix-tree, etc.
38 The map is defined by:
41 - max number of elements