XDP/eBPF map thread safety in kernel (e.g. lookup/delete)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Where to find exact documentation about what happens in kernel BPF
helpers calls with respect to locking? For example, I have
`bpf_map_lookup_elem()` in one thread, then work on pointer, and at this
time, another thread does `bpf_map_delete_elem()` for exactly same key.
What happens to memory the first thread still continue to work on? Is
it now dangling pointer to nowhere?

In my particular case it's a bpf_timer callback who does
`bpf_map_delete_elem()`. I'd prefer for it to not delete entry if
another thread did `lookup` and works already, is it possible to do so
(in a performant way)?

-- 
WBR, @nuclight




[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux