summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-04-09 11:49:10 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2019-04-11 10:21:41 +0200
commit5e903c656b98614698a891c6e098186272cbba14 (patch)
tree3be59bca2d7c6bc7e1b19dbce746fe5a19fde349 /tools/include
parentb0b9395d865e3060d97658fbc9ba3f77fecc8da1 (diff)
downloadlinux-5e903c656b98614698a891c6e098186272cbba14.tar.bz2
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>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/uapi/linux/bpf.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index af1cbd951f26..31a27dd337dc 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -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 */