Skip to content

Conversation

r41k0u
Copy link
Collaborator

@r41k0u r41k0u commented Sep 30, 2025

No description provided.

@r41k0u r41k0u changed the title Add is_map in maps_pass Refactor maps_pass Sep 30, 2025
@r41k0u r41k0u marked this pull request as ready for review September 30, 2025 14:22
@r41k0u r41k0u requested a review from Copilot September 30, 2025 14:22
Copy link

@Copilot Copilot AI left a 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.

@r41k0u r41k0u merged commit 980f2af into master Sep 30, 2025
@varun-r-mallya varun-r-mallya deleted the refactor-maps branch October 2, 2025 12:42
@varun-r-mallya varun-r-mallya moved this to In progress in TODOs Oct 8, 2025
@varun-r-mallya varun-r-mallya moved this from In progress to Done in TODOs Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant