I would like to know if there is a syscall which can be used through libbpf to lookup a map and also update the contents of the map. My use case is to lookup and update an map type of BPF_MAP_TYPE_ARRAY by holding a bpf spin lock.
I thought of changing my map type to BPF_MAP_TYPE_HASH and use the BPF_MAP_LOOKUP_AND_DELETE_ELEM.
But in my use case, I don’t have to delete the map element but to update the map to an initial value.
New contributor
Alen Antony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.