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

Support/examples for batch operations #1124

Open
esemeniuc opened this issue Dec 28, 2024 · 1 comment
Open

Support/examples for batch operations #1124

esemeniuc opened this issue Dec 28, 2024 · 1 comment

Comments

@esemeniuc
Copy link

esemeniuc commented Dec 28, 2024

Libbpf offers batch operations to save on syscalls for iterating over maps, for example bpf_map_lookup_and_delete_batch or BPF_MAP_UPDATE_BATCH in https://libbpf.readthedocs.io/en/latest/api.html. I see some bindings at

pub const BPF_MAP_LOOKUP_AND_DELETE_BATCH: Type = 25;
, however it is not clear how they should be used with aya's Hashmap implementation. Anywhere I can look to point me in the right direction?

The closest example I see is

lookup(fd, key, flags, bpf_cmd::BPF_MAP_LOOKUP_AND_DELETE_ELEM)
(which is not batched, and lookup is not public)

@esemeniuc
Copy link
Author

Current workaround: #1125 (comment)

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

1 participant