Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for bpf_map_lookup_batch()/bpf_map_lookup_and_delete_batch() in libbpf-rs #655

Open
telbizov opened this issue Jan 24, 2024 · 2 comments

Comments

@telbizov
Copy link

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

@danielocfb
Copy link
Collaborator

danielocfb commented Jan 24, 2024

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.

@telbizov
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants