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:
@ -7,8 +7,8 @@ from ctypes import c_int64, c_void_p
|
||||
@bpf
|
||||
@section("kprobe/blk_mq_start_request")
|
||||
def example(ctx: c_void_p) -> c_int64:
|
||||
d = XDP_PASS # This gives an error, but
|
||||
e = XDP_PASS + 0 # this does not
|
||||
d = XDP_PASS # This gives an error, but
|
||||
e = XDP_PASS + 0 # this does not
|
||||
print(f"test1 {e} test2 {d}")
|
||||
return c_int64(0)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
from vmlinux import struct_request, struct_pt_regs
|
||||
from pythonbpf import bpf, section, bpfglobal, compile_to_ir
|
||||
import logging
|
||||
from ctypes import c_int64, c_void_p
|
||||
from ctypes import c_int64
|
||||
|
||||
|
||||
@bpf
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from vmlinux import struct_request, struct_pt_regs, XDP_PASS
|
||||
from vmlinux import struct_pt_regs
|
||||
from pythonbpf import bpf, section, bpfglobal, compile_to_ir
|
||||
import logging
|
||||
from ctypes import c_int64
|
||||
|
||||
Reference in New Issue
Block a user