mirror of https://github.com/aya-rs/aya
Return non error only when helper function returns `0` in queue map
As described in https://github.com/aya-rs/aya/issues/288, queue does not return `error` even calling pop() from the empty queue. This is because the helper functions (`bpf_map_pop_elem()`) does not return negative value for Rust/aya correctly. The `bpf_map_pop_elem()` and `bpf_map_push_elem()` returns `0` on success - https://man7.org/linux/man-pages/man7/bpf-helpers.7.html, so this patch changes the condition as only `0` on success. Fix https://github.com/aya-rs/aya/issues/288pull/289/head
parent
4acd996cb8
commit
05419829d3
Loading…
Reference in New Issue