Skip to content

Libbpf userspace function bpf_map_delete_elem

0.0.1

Low level wrapper around the BPF_MAP_DELETE_ELEM syscall command.

Definition

int bpf_map_delete_elem(int fd, const void *key);

Parameters

  • fd: file descriptor of the map to delete element from
  • key: pointer to memory containing bytes of the key

Return

0, on success; negative error, otherwise

Usage

This function should only be used if you need precise control over the map element delete process. In most cases the bpf_map__delete_elem function should be used instead.

Example

Docs could be improved

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