mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-03 07:09:06 +08:00
libbpf: add support for ctx_{size, }_{in, out} in BPF_PROG_TEST_RUN
Support recently introduced input/output context for test runs. We extend only bpf_prog_test_run_xattr. bpf_prog_test_run is unextendable and left as is. Signed-off-by: Stanislav Fomichev <sdf@google.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
committed by
yonghong-song
parent
ac2254d0ea
commit
e2871d1c75
@@ -136,6 +136,11 @@ struct bpf_prog_test_run_attr {
|
||||
* out: length of data_out */
|
||||
__u32 retval; /* out: return code of the BPF program */
|
||||
__u32 duration; /* out: average per repetition in ns */
|
||||
const void *ctx_in; /* optional */
|
||||
__u32 ctx_size_in;
|
||||
void *ctx_out; /* optional */
|
||||
__u32 ctx_size_out; /* in: max length of ctx_out
|
||||
* out: length of cxt_out */
|
||||
};
|
||||
|
||||
LIBBPF_API int bpf_prog_test_run_xattr(struct bpf_prog_test_run_attr *test_attr);
|
||||
|
||||
Reference in New Issue
Block a user