Skip to content

Commit

Permalink
Add Python API for bpf_prog_test_run_opts
Browse files Browse the repository at this point in the history
  • Loading branch information
tariromukute authored and yonghong-song committed Jan 17, 2024
1 parent c25c00e commit 1a784cf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/python/bcc/libbcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,26 @@ class bcc_perf_buffer_opts(ct.Structure):
lib.bpf_poll_ringbuf.argtypes = [ct.c_void_p, ct.c_int]
lib.bpf_consume_ringbuf.restype = ct.c_int
lib.bpf_consume_ringbuf.argtypes = [ct.c_void_p]
class bpf_test_run_opts(ct.Structure):
_fields_ = [
('sz', ct.c_size_t),
('data_in', ct.c_void_p),
('data_out', ct.c_void_p),
('data_size_in', ct.c_uint32),
('data_size_out', ct.c_uint32),
('ctx_in', ct.c_void_p),
('ctx_out', ct.c_void_p),
('ctx_size_in', ct.c_uint32),
('ctx_size_out', ct.c_uint32),
('retval', ct.c_uint32),
('repeat', ct.c_int),
('duration', ct.c_uint32),
('flags', ct.c_uint32),
('cpu', ct.c_uint32),
('batch_size', ct.c_uint32),
]
lib.bpf_prog_test_run_opts.restype = ct.c_int
lib.bpf_prog_test_run_opts.argtypes = [ct.c_int, ct.POINTER(bpf_test_run_opts)]

# bcc symbol helpers
class bcc_symbol(ct.Structure):
Expand Down

0 comments on commit 1a784cf

Please sign in to comment.