-
Notifications
You must be signed in to change notification settings - Fork 3
bpf_helper_handler refactor #10
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
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 helper handling code by extracting functionality from a monolithic module into a more modular structure with separate utility functions and a registry pattern.
- Extract helper utilities into a separate module with common functions for pointer management, string formatting, and data handling
- Implement a registry pattern for BPF helper handlers using decorators for cleaner registration
- Replace hardcoded helper function lists with dynamic registry lookups
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
pythonbpf/helper/helper_utils.py | New utility module containing common helper functions for pointer creation, string formatting, and data processing |
pythonbpf/helper/bpf_helper_handler.py | New module with BPF helper handlers registered using decorator pattern and enum for helper IDs |
pythonbpf/helper/init.py | Package initialization exposing registry and handler function |
pythonbpf/functions_pass.py | Updated imports to use new registry pattern instead of hardcoded helper list |
pythonbpf/expr_pass.py | Updated imports to use new registry pattern |
pythonbpf/bpf_helper_handler.py | Removed original monolithic helper handler file |
examples/sys_sync.py | Added blank line |
examples/struct_and_perf.py | Removed unused variable assignments |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@r41k0u can we merge ? need to do some work on this part. |
merged |
No description provided.