Skip to content

Libbpf userspace function bpf_map__set_max_entries

0.1.0

Set the maximum number of entries in a BPF map.

Definition

int bpf_map__set_max_entries(struct bpf_map *map, __u32 max_entries);

Parameters

  • map: Pointer to the BPF map.
  • max_entries: Maximum number of entries in the BPF map.

Return

0 on success, a negative error in case of failure.

Usage

The maximum number of entries can only be modified before the map is loaded.

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome