Conversation
| Global maps will use IDs from 1 to 4095. Extensible maps will use IDs 4096 onwards. | ||
|
|
||
| - **Global Maps (1-4095)**: Reserved for core eBPF runtime map types (hash, array, etc.) | ||
| - **Extensible Maps (4096+)**: Available for extension-implemented custom map types |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Pull request overview
This PR proposes a design for implementing custom maps in eBPF-for-Windows, enabling extensions to register and manage their own map types (e.g., BPF_MAP_TYPE_XSKMAP) through a new NMR provider interface while leveraging the core runtime's existing map implementations.
Key changes:
- Introduces a new NMR provider interface for custom maps with provider registration data and dispatch tables
- Partitions the map type ID space: IDs 1-4095 for core maps, 4096+ for custom maps
- Documents the map creation flow, lifecycle management, and how existing APIs remain unchanged
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@dthaler -- Even though it is recommended, extensions can choose to not register the new map type. Keeping a different range helps ebpfcore know if this is a native map type, or it needs to attach to an NMR provider for this map type. |
This comment was marked as resolved.
This comment was marked as resolved.
It is not. Helper function IDs are also partitioned today. Program type specific helper functions need to start from 0xFFFF |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
No the map type ID would be globally unique across program types, hence the recommendation to register it in eBPF repo, to avoid a conflict. |
This comment was marked as resolved.
This comment was marked as resolved.
Updated text. |
Co-authored-by: Dave Thaler <dthaler1968@gmail.com>
dthaler
left a comment
There was a problem hiding this comment.
Looks ok modulo one wording nit.
Co-authored-by: Dave Thaler <dthaler1968@gmail.com>
|
@dthaler can you re-approve the PR. I had pushed another commit based on the review comments. |
Fixes #4375
Description
This PR adds proposal for implementing custom maps (#4375).
Testing
NA
Documentation
This PR adds doc.
Installation
No