Allocate hashmap lookup return vars based on the value type of said hashmap

This commit is contained in:
Pragyansh Chaturvedi
2025-11-19 04:09:51 +05:30
parent 9f5ec62383
commit 19b42b9a19
4 changed files with 79 additions and 8 deletions

View File

@ -48,7 +48,7 @@ def create_bpf_map(module, map_name, map_params):
map_global.align = 8
logger.info(f"Created BPF map: {map_name} with params {map_params}")
return MapSymbol(type=map_params["type"], sym=map_global)
return MapSymbol(type=map_params["type"], sym=map_global, params=map_params)
def _parse_map_params(rval, expected_args=None):

View File

@ -11,6 +11,7 @@ class MapSymbol:
type: BPFMapType
sym: ir.GlobalVariable
params: dict[str, Any] | None = None
class MapProcessorRegistry: