Messages in this thread | | | From | Yosry Ahmed <> | Date | Fri, 22 Jul 2022 10:49:52 -0700 | Subject | Re: [PATCH bpf-next v4 1/8] btf: Add a new kfunc set which allows to mark a function to be sleepable |
| |
On Fri, Jul 22, 2022 at 9:20 AM Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote: > > On Thu, Jul 21, 2022 at 7:13 PM Yosry Ahmed <yosryahmed@google.com> wrote: > > > > From: Benjamin Tissoires <benjamin.tissoires@redhat.com> > > > > This allows to declare a kfunc as sleepable and prevents its use in > > a non sleepable program. > > > > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> > > Signed-off-by: Yosry Ahmed <yosryahmed@google.com> > > --- > > include/linux/btf.h | 2 ++ > > kernel/bpf/btf.c | 13 +++++++++++-- > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/include/linux/btf.h b/include/linux/btf.h > > index 1bfed7fa0428..6e7517573d9e 100644 > > --- a/include/linux/btf.h > > +++ b/include/linux/btf.h > > @@ -18,6 +18,7 @@ enum btf_kfunc_type { > > BTF_KFUNC_TYPE_RELEASE, > > BTF_KFUNC_TYPE_RET_NULL, > > BTF_KFUNC_TYPE_KPTR_ACQUIRE, > > + BTF_KFUNC_TYPE_SLEEPABLE, > > BTF_KFUNC_TYPE_MAX, > > }; > > This patch needs refactoring using the new BTF_ID_FLAGS scheme. > When you do that please update the Documentation/bpf/kfuncs.rst as well. > > Thanks!
Sent v5 rebased on top of the new kfunc flags infrastructure, and added documentation for sleepable kfuncs.
| |