Libbpf userspace function bpf_program__log_buf
Get the log buffer of a BPF program.
Definition
const char *bpf_program__log_buf(const struct bpf_program *prog, size_t *log_size);
Parameters
prog
: BPF program to get the log buffer oflog_size
: Pointer to asize_t
variable to which the size of the log will be written
Return
Pointer to the log buffer of the BPF program. The log buffer is a null-terminated string containing the verifier log.
Usage
Get the log buffer of the BPF program, which will contain the verifier log after loading. This log is important to understand why a BPF program failed when its rejected by the verifier.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome