Hi,

Is there an easy way to clear all entries in a BPF hash map?

My use case:
When my BPF userspace program and kernel BPF is running, I want to
dynamically adding a new BPF hash map. IIUC, there is no way to do
that. So at beginning when loading the BPF, I pre-allocate a pool of
hash maps and always lookup all of them. At certain point, my
userspace BPF program wants to invalidate a particular map by clearing
all its entries. I pinned all maps as PIN_GLOBAL_NS so I think
userspace calling close() then open() won't clear all entries. Is
there a better way to do it? If there is a BPF_FUNC_map_delete_all,
then it will be great. Thanks!

Regards,
William
_______________________________________________
iovisor-dev mailing list
[email protected]
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to