Re: [PATCH bpf-next 11/18] bpf: wq: add bpf_wq_init

2024-04-19 Thread Benjamin Tissoires
On Apr 19 2024, Alexei Starovoitov wrote: > On Fri, Apr 19, 2024 at 8:12 AM Benjamin Tissoires wrote: > > > > > > It's something I added while adding the tests. And some tests were passing > > in case I was having a non sleepable callback. But if we have > > bpf_rcu_read_lock(), we are all fine

Re: [PATCH bpf-next 11/18] bpf: wq: add bpf_wq_init

2024-04-19 Thread Alexei Starovoitov
On Fri, Apr 19, 2024 at 8:12 AM Benjamin Tissoires wrote: > > > It's something I added while adding the tests. And some tests were passing > in case I was having a non sleepable callback. But if we have > bpf_rcu_read_lock(), we are all fine and can reduce the complexity. Not quite following

Re: [PATCH bpf-next 11/18] bpf: wq: add bpf_wq_init

2024-04-19 Thread Benjamin Tissoires
On Apr 18 2024, Alexei Starovoitov wrote: > On Tue, Apr 16, 2024 at 04:08:24PM +0200, Benjamin Tissoires wrote: > > We need to teach the verifier about the second argument which is declared > > as void * but which is of type KF_ARG_PTR_TO_MAP. We could have dropped > > this extra case if we

Re: [PATCH bpf-next 11/18] bpf: wq: add bpf_wq_init

2024-04-18 Thread Alexei Starovoitov
On Tue, Apr 16, 2024 at 04:08:24PM +0200, Benjamin Tissoires wrote: > We need to teach the verifier about the second argument which is declared > as void * but which is of type KF_ARG_PTR_TO_MAP. We could have dropped > this extra case if we declared the second argument as struct bpf_map *, > but

[PATCH bpf-next 11/18] bpf: wq: add bpf_wq_init

2024-04-16 Thread Benjamin Tissoires
We need to teach the verifier about the second argument which is declared as void * but which is of type KF_ARG_PTR_TO_MAP. We could have dropped this extra case if we declared the second argument as struct bpf_map *, but that means users will have to do extra casting to have their program