Re: [PATCH net-next v2 08/10] net: sched: protect block idr with spinlock

2018-09-21 Thread Cong Wang
On Thu, Sep 20, 2018 at 12:36 AM Vlad Buslov wrote: > > > On Wed 19 Sep 2018 at 22:09, Cong Wang wrote: > > On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote: > >> @@ -482,16 +483,25 @@ static int tcf_block_insert(struct tcf_block *block, > >> struct net *net, > >>

Re: [PATCH net-next v2 08/10] net: sched: protect block idr with spinlock

2018-09-20 Thread Vlad Buslov
On Wed 19 Sep 2018 at 22:09, Cong Wang wrote: > On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote: >> @@ -482,16 +483,25 @@ static int tcf_block_insert(struct tcf_block *block, >> struct net *net, >> struct netlink_ext_ack *extack) >> { >> struct tcf_net

Re: [PATCH net-next v2 08/10] net: sched: protect block idr with spinlock

2018-09-19 Thread Cong Wang
On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote: > @@ -482,16 +483,25 @@ static int tcf_block_insert(struct tcf_block *block, > struct net *net, > struct netlink_ext_ack *extack) > { > struct tcf_net *tn = net_generic(net, tcf_net_id); > + int err; >

[PATCH net-next v2 08/10] net: sched: protect block idr with spinlock

2018-09-17 Thread Vlad Buslov
Protect block idr access with spinlock, instead of relying on rtnl lock. Take tn->idr_lock spinlock during block insertion and removal. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- net/sched/cls_api.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git