Libbpf userspace function bpf_map_delete_batch
Allows for batch deletion of multiple elements in a BPF map.
Definition
int bpf_map_delete_batch(int fd, const void *keys, __u32 *count, const struct bpf_map_batch_opts *opts);
Parameters
fd: BPF map file descriptorkeys: pointer to an array ofcountkeyscount: input and output parameter; on inputcountrepresents the number of elements in the map to delete in batch; on output if a non-EFAULTerror is returned,countrepresents the number of deleted elements if the outputcountvalue is not equal to the inputcountvalue If-EFAULTis returned,countshould not be trusted to be correct.opts: options for configuring the way the batch deletion works
Return
0, on success; negative error code, otherwise (errno is also set to the error code)
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome