Merged
Conversation
d537828 to
0d69186
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the BPF maps processing system by introducing a registry pattern for map processors and improving code organization. The refactoring moves from hardcoded map type handling to a more flexible, extensible registry-based approach.
Key changes:
- Introduces
MapProcessorRegistryfor managing map processor functions with a decorator-based registration system - Replaces global variables and hardcoded dictionaries with proper encapsulation and enum-based map type definitions
- Improves logging by replacing print statements with proper logging infrastructure
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pythonbpf/maps/maps_utils.py | New registry class for managing map processor functions |
| pythonbpf/maps/maps_pass.py | Refactored map processing logic with registry pattern, enums, and logging |
| pythonbpf/maps/init.py | New module initialization file for maps package |
| pythonbpf/codegen.py | Updated import path to use the new maps package structure |
| examples/c-form/ex8.bpf.c | Added example C BPF program (appears to be reference material) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.