Libbpf userspace function bpf_map__set_key_size
Set the size of the key of a BPF map.
Definition
int bpf_map__set_key_size(struct bpf_map *map, __u32 size);
Parameters
map
: Pointer to the BPF map.size
: Size of the key of the BPF map in bytes.
Return
0
on success, a negative error in case of failure.
Usage
Changing the size of the key of a BPF map can only be done before it is loaded.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome