Libbpf userspace function bpf_program__unload
Unload a BPF program.
Definition
void bpf_program__unload(struct bpf_program *prog);
Usage
This function closes the file descriptor of the BPF program, decrementing its refcount. This will cause the program to be unloaded, if there are no other references to it.
A program might still stay loaded in the kernel if anything else maintains a reference like:
- A BPF link
- A subsystem that maintains a link (such as XDP or TC)
- A BPFFS pin
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome