format chore

This commit is contained in:
2025-10-11 21:33:39 +05:30
parent 7c559840f0
commit abbf17748d
11 changed files with 27 additions and 10 deletions

View File

@ -2,6 +2,8 @@ from pythonbpf import bpf, map, section, bpfglobal, compile, compile_to_ir
from pythonbpf.maps import HashMap
from pythonbpf.helper import XDP_PASS
from vmlinux import struct_xdp_md
from vmlinux import struct_ring_buffer_per_cpu # noqa: F401
from vmlinux import struct_xdp_buff # noqa: F401
from ctypes import c_int64
# Instructions to how to run this program
@ -11,6 +13,7 @@ from ctypes import c_int64
# 4. Attach object file to any network device with something like ./check.sh xdp examples/xdp_pass.o tailscale0
# 5. send traffic through the device and observe effects
@bpf
@map
def count() -> HashMap:
@ -39,5 +42,6 @@ def hello_world(ctx: struct_xdp_md) -> c_int64:
def LICENSE() -> str:
return "GPL"
compile_to_ir("xdp_pass.py", "xdp_pass.ll")
compile()