Add support for bpf_map_lookup_batch()/bpf_map_lookup_and_delete_batch() in libbpf-rs
Hello folks,
Apologies if there's a better way to report this, but I am new to rust and libbpf-rs so please redirect me appropriately.
I'm rewriting part of a project from C to Rust and trying to use libbpf-rs for the userland components.
I rely heavily on the batch map operations since I deal with large hash maps. The C functions bpf_map_lookup_batch() and bpf_map_lookup_and_delete_batch() do not seem to be implemented/wrapped in the libbpf-rs crate, but certainly are available in the underlying libbpf-sys . The delete_batch() and update_batch() are wrapped in the Rust library so I was wondering why that might be the case and submit a feature request to start supporting them in libbpf-rs too.
Thank you in advance, Rumen Telbizov
Yes, there is no particular reason other than "nobody has implemented [or asked for] it". Feel free to open a pull request if you decide to work on it or let us know if you need help with the same.
Understood. I'll see what I can do. I am afraid, at this point I am too new to Rust and don't feel confident in my abilities to submit a PR.
I'll keep trying to implement it in my own project by calling the underlying bpf_map_lookup_batch() from libbpf-sys and hopefully I can get it to work. Hopefully in the (near) future I'll be able to come back with a PR.
Thanks @danielocfb