mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-02-12 16:10:59 +00:00
Add map_sym_tab
This commit is contained in:
@ -2,6 +2,9 @@ import ast
|
||||
from llvmlite import ir
|
||||
from .type_deducer import ctypes_to_ir
|
||||
|
||||
map_sym_tab = {}
|
||||
|
||||
|
||||
def maps_proc(tree, module, chunks):
|
||||
for func_node in chunks:
|
||||
# Check if this function is a map
|
||||
@ -39,8 +42,10 @@ def create_bpf_map(module, map_name, map_params):
|
||||
map_global.align = 8 # type: ignore
|
||||
|
||||
print(f"Created BPF map: {map_name}")
|
||||
map_sym_tab[map_name] = map_global
|
||||
return map_global
|
||||
|
||||
|
||||
def process_hash_map(map_name, rval, module):
|
||||
print(f"Creating HashMap map: {map_name}")
|
||||
map_params: dict[str, object] = {"map_type": "HASH"}
|
||||
|
||||
Reference in New Issue
Block a user