insearchoflosttime
insearchoflosttime
We need to preserve the errno and set it back after the callback function is called. For more context, please see https://github.com/libbpf/libbpf/pull/536
As part of the initiative to reach feature-parity with libbpf-1.0, this commit adds wrapper functions around: * bpf_program__set_log_level * bpf_program__log_level * bpf_program__autoload * bpf_program__unload Signed-off-by: Joanne Koong
ring_buffer__poll in libbpf internally calls epoll_wait. Specifying a timeout of -1 to epoll_wait causes it to block indefinitely if no event transpires. We should support this functionality in libbpf-rs as...
bpf_program__attach_uprobe_opts in libbpf: https://github.com/libbpf/libbpf/blob/master/src/libbpf.h#L603-L604
To update a link in libbpf, there is this API: ``` LIBBPF_API int bpf_link_update(int link_fd, int new_prog_fd, const struct bpf_link_update_opts *opts); ``` https://github.com/libbpf/libbpf/blob/3591deb9bc6b0848721f831790b78ae0a593b4c5/src/bpf.h#L434 In libbpf-rs, we should support this operation...
To create a link in libbpf, there is this API: ``` LIBBPF_API int bpf_link_create(int prog_fd, int target_fd, enum bpf_attach_type attach_type, const struct bpf_link_create_opts *opts); ``` https://github.com/libbpf/libbpf/blob/3591deb9bc6b0848721f831790b78ae0a593b4c5/src/bpf.h In libbpf-rs, we should...
Defined in libbpf as: ``` LIBBPF_API int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags, const struct bpf_xdp_attach_opts *opts); LIBBPF_API int bpf_xdp_detach(int ifindex, __u32 flags, const struct bpf_xdp_attach_opts *opts); ``` https://github.com/libbpf/libbpf/blob/3591deb9bc6b0848721f831790b78ae0a593b4c5/src/libbpf.h#L898-L901
``` LIBBPF_API int bpf_xdp_query(int ifindex, int flags, struct bpf_xdp_query_opts *opts); LIBBPF_API int bpf_xdp_query_id(int ifindex, int flags, __u32 *prog_id); ``` https://github.com/libbpf/libbpf/blob/3591deb9bc6b0848721f831790b78ae0a593b4c5/src/libbpf.h#L902-L903
Implement the ability to register + unregister a prog handler. This should be a wrapper around the libbpf library's ``` /** * @brief **libbpf_register_prog_handler()** registers a custom BPF program *...