Re: [PATCH bpf-next] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-15 Thread Jakub Kicinski
On Mon, 14 Sep 2020 11:46:30 -0700 Yonghong Song wrote: > Currently, we use bucket_lock when traversing bpf_sk_storage_map > elements. Since bpf_iter programs cannot use bpf_sk_storage_get() > and bpf_sk_storage_delete() helpers which may also grab bucket lock, > we do not have a deadlock issue whi

Re: [PATCH bpf-next] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-15 Thread Alexei Starovoitov
On Tue, Sep 15, 2020 at 11:56 AM Yonghong Song wrote: > > > > On 9/15/20 10:40 AM, Jakub Kicinski wrote: > > On Tue, 15 Sep 2020 10:35:50 -0700 Yonghong Song wrote: > >> On 9/15/20 8:33 AM, Jakub Kicinski wrote: > >>> On Mon, 14 Sep 2020 11:46:30 -0700 Yonghong Song wrote: > Currently, we use

Re: [PATCH bpf-next] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-15 Thread Yonghong Song
On 9/15/20 10:40 AM, Jakub Kicinski wrote: On Tue, 15 Sep 2020 10:35:50 -0700 Yonghong Song wrote: On 9/15/20 8:33 AM, Jakub Kicinski wrote: On Mon, 14 Sep 2020 11:46:30 -0700 Yonghong Song wrote: Currently, we use bucket_lock when traversing bpf_sk_storage_map elements. Since bpf_iter prog

Re: [PATCH bpf-next] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-15 Thread Yonghong Song
On 9/15/20 8:33 AM, Jakub Kicinski wrote: On Mon, 14 Sep 2020 11:46:30 -0700 Yonghong Song wrote: Currently, we use bucket_lock when traversing bpf_sk_storage_map elements. Since bpf_iter programs cannot use bpf_sk_storage_get() and bpf_sk_storage_delete() helpers which may also grab bucket l

Re: [PATCH bpf-next] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-15 Thread Jakub Kicinski
On Tue, 15 Sep 2020 10:35:50 -0700 Yonghong Song wrote: > On 9/15/20 8:33 AM, Jakub Kicinski wrote: > > On Mon, 14 Sep 2020 11:46:30 -0700 Yonghong Song wrote: > >> Currently, we use bucket_lock when traversing bpf_sk_storage_map > >> elements. Since bpf_iter programs cannot use bpf_sk_storage_ge

Re: [PATCH bpf-next] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-14 Thread Yonghong Song
On 9/14/20 2:28 PM, Song Liu wrote: On Mon, Sep 14, 2020 at 11:47 AM Yonghong Song wrote: Currently, we use bucket_lock when traversing bpf_sk_storage_map elements. Since bpf_iter programs cannot use bpf_sk_storage_get() and bpf_sk_storage_delete() helpers which may also grab bucket lock, w

Re: [PATCH bpf-next] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-14 Thread Song Liu
On Mon, Sep 14, 2020 at 11:47 AM Yonghong Song wrote: > > Currently, we use bucket_lock when traversing bpf_sk_storage_map > elements. Since bpf_iter programs cannot use bpf_sk_storage_get() > and bpf_sk_storage_delete() helpers which may also grab bucket lock, > we do not have a deadlock issue wh