mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-12 00:43:36 -04: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:
parent
b0b9395d86
commit
5e903c656b
3 changed files with 17 additions and 0 deletions
|
@ -412,6 +412,13 @@ union bpf_attr {
|
|||
__aligned_u64 data_out;
|
||||
__u32 repeat;
|
||||
__u32 duration;
|
||||
__u32 ctx_size_in; /* input: len of ctx_in */
|
||||
__u32 ctx_size_out; /* input/output: len of ctx_out
|
||||
* returns ENOSPC if ctx_out
|
||||
* is too small.
|
||||
*/
|
||||
__aligned_u64 ctx_in;
|
||||
__aligned_u64 ctx_out;
|
||||
} test;
|
||||
|
||||
struct { /* anonymous struct used by BPF_*_GET_*_ID */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue