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 ofcount
keyscount
: input and output parameter; on inputcount
represents the number of elements in the map to delete in batch; on output if a non-EFAULT
error is returned,count
represents the number of deleted elements if the outputcount
value is not equal to the inputcount
value If-EFAULT
is returned,count
should 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