-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor maps_pass #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d537828
to
0d69186
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
MapProcessorRegistry
for 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.
No description provided.