Re: [PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-26 Thread Vlad Buslov
On Sun 25 Aug 2019 at 21:32, Cong Wang wrote: > On Wed, Aug 21, 2019 at 11:27 AM Vlad Buslov wrote: >> At first I was confused why you bring up rtnl lock in commit message >> (flower classifier has 'unlocked' flag set and can't rely on it anymore) >> but looking at the code I see that we lost r

Re: [PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-25 Thread Cong Wang
On Wed, Aug 21, 2019 at 11:27 AM Vlad Buslov wrote: > At first I was confused why you bring up rtnl lock in commit message > (flower classifier has 'unlocked' flag set and can't rely on it anymore) > but looking at the code I see that we lost rcu read lock here in commit > d39d714969cd ("idr: intr

Re: [PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-21 Thread Vlad Buslov
On Wed 21 Aug 2019 at 01:32, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Inline __fl_get() into fl_get(). Use the RCU lock explicitly for > lookups and walks instead of relying on RTNL. The xa_lock protects us, > but remains nested under the RTNL for now. > > Signed-off-by: Matt

Re: [PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-20 Thread Matthew Wilcox
On Tue, Aug 20, 2019 at 04:58:34PM -0700, David Miller wrote: > From: Matthew Wilcox > Date: Tue, 20 Aug 2019 15:32:50 -0700 > > > - idr_replace(&head->handle_idr, fnew, fnew->handle); > > + xa_store(&head->filters, fnew->handle, fnew, 0); > > Passing a gfp_t of zero? :-) Ye

Re: [PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-20 Thread David Miller
From: Matthew Wilcox Date: Tue, 20 Aug 2019 15:32:50 -0700 > - idr_replace(&head->handle_idr, fnew, fnew->handle); > + xa_store(&head->filters, fnew->handle, fnew, 0); Passing a gfp_t of zero? :-)

[PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Inline __fl_get() into fl_get(). Use the RCU lock explicitly for lookups and walks instead of relying on RTNL. The xa_lock protects us, but remains nested under the RTNL for now. Signed-off-by: Matthew Wilcox (Oracle) --- net/sched/cls_flower.c | 54 ++