mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
format chore
This commit is contained in:
@ -112,7 +112,11 @@ def process_vmlinux_post_ast(
|
|||||||
type_length = elem_type._length_
|
type_length = elem_type._length_
|
||||||
|
|
||||||
if containing_type.__module__ == "vmlinux":
|
if containing_type.__module__ == "vmlinux":
|
||||||
new_dep_node.add_dependent(elem_type._type_.__name__ if hasattr(elem_type._type_, "__name__") else str(elem_type._type_))
|
new_dep_node.add_dependent(
|
||||||
|
elem_type._type_.__name__
|
||||||
|
if hasattr(elem_type._type_, "__name__")
|
||||||
|
else str(elem_type._type_)
|
||||||
|
)
|
||||||
elif containing_type.__module__ == ctypes.__name__:
|
elif containing_type.__module__ == ctypes.__name__:
|
||||||
if isinstance(elem_type, type):
|
if isinstance(elem_type, type):
|
||||||
if issubclass(elem_type, ctypes.Array):
|
if issubclass(elem_type, ctypes.Array):
|
||||||
@ -149,7 +153,11 @@ def process_vmlinux_post_ast(
|
|||||||
"Module not supported in recursive resolution"
|
"Module not supported in recursive resolution"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
new_dep_node.add_dependent(elem_type.__name__ if hasattr(elem_type, "__name__") else str(elem_type))
|
new_dep_node.add_dependent(
|
||||||
|
elem_type.__name__
|
||||||
|
if hasattr(elem_type, "__name__")
|
||||||
|
else str(elem_type)
|
||||||
|
)
|
||||||
process_vmlinux_post_ast(
|
process_vmlinux_post_ast(
|
||||||
elem_type, llvm_handler, handler, processing_stack
|
elem_type, llvm_handler, handler, processing_stack
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,8 +2,8 @@ from pythonbpf import bpf, map, section, bpfglobal, compile_to_ir
|
|||||||
from pythonbpf.maps import HashMap
|
from pythonbpf.maps import HashMap
|
||||||
from pythonbpf.helper import XDP_PASS
|
from pythonbpf.helper import XDP_PASS
|
||||||
from vmlinux import struct_xdp_md
|
from vmlinux import struct_xdp_md
|
||||||
from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401
|
from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401
|
||||||
from vmlinux import struct_ring_buffer_per_cpu # noqa: F401
|
from vmlinux import struct_ring_buffer_per_cpu # noqa: F401
|
||||||
|
|
||||||
from ctypes import c_int64
|
from ctypes import c_int64
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user