summaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorDavid Vernet <void@manifault.com>2023-01-25 10:47:35 -0600
committerAlexei Starovoitov <ast@kernel.org>2023-01-25 10:25:57 -0800
commit7dd880592a88799f3ef48fda507849a75f11cbf0 (patch)
tree86fdb6a4bd97f6de4ff32ddfc2ca8d83fa9666d6 /include/linux/bpf.h
parent51a52a29ebaa8395de090fa415c6e1b2899a50f1 (diff)
downloadlinux-stable-7dd880592a88799f3ef48fda507849a75f11cbf0.tar.gz
linux-stable-7dd880592a88799f3ef48fda507849a75f11cbf0.tar.bz2
linux-stable-7dd880592a88799f3ef48fda507849a75f11cbf0.zip
bpf/selftests: Verify struct_ops prog sleepable behavior
In a set of prior changes, we added the ability for struct_ops programs to be sleepable. This patch enhances the dummy_st_ops selftest suite to validate this behavior by adding a new sleepable struct_ops entry to dummy_st_ops. Signed-off-by: David Vernet <void@manifault.com> Link: https://lore.kernel.org/r/20230125164735.785732-5-void@manifault.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 0d868ef1b973..14a0264fac57 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1474,6 +1474,7 @@ struct bpf_dummy_ops {
int (*test_1)(struct bpf_dummy_ops_state *cb);
int (*test_2)(struct bpf_dummy_ops_state *cb, int a1, unsigned short a2,
char a3, unsigned long a4);
+ int (*test_sleepable)(struct bpf_dummy_ops_state *cb);
};
int bpf_struct_ops_test_run(struct bpf_prog *prog, const union bpf_attr *kattr,