- LOOKUP
- O(1) avg
- ACCESS
- kernel + user
- TYPES
- 30+ built-in
- CONTENTION
- shared lock
- CPU hook write
- userspace read / poll
- ringbuf event stream
The workhorses are BPF_MAP_TYPE_ARRAY (fast fixed-size index table), BPF_MAP_TYPE_HASH (arbitrary keys like 5-tuples or PIDs), and LPM_TRIE (longest-prefix CIDR routing).
Kernel hooks read and write via bpf_map_lookup_elem() and bpf_map_update_elem(), while user-space daemons iterate keys through the bpf() syscall or mmap.
What changed
- Ephemeral stack → persistent kernel hash & array maps
- Isolated hooks → entry hook writes timestamp, exit reads it
- User-space agent → reads aggregated counters on demand