microsoft / microsoft/ebpf-for-windows
Add `BPF_F_NO_MAX_ENTRIES` option for map creation
Open
bug
triaged
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 311
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 21
Description
Currently for hash maps, ebpf-for-windows behavior is different from Linux. On Windows, max entries for hash maps determines the number of buckets, but it does not limit the number of entries that can be added to the hash map. This change was deliberately done in PR #3348 for scenarios where we cannot pre-determine the size of hash map required.
**Proposal**:
Make the unbounded hash map behavior optional by adding a new map creation flag `BPF_F_NO_MAX_ENTRIES`. This will allow the default behavior to align with Linux, and solutions that explicitly want unbounded map behavior can opt-in by using this new flag.
Contributor guide
Assessment
This issue has not been assessed yet.