Re: [Patch net v2 2/2] net_sched: fix all the madness of tc filter chain

2017-09-11 Thread Cong Wang
On Mon, Sep 11, 2017 at 2:14 PM, Cong Wang wrote: > > Looks like all due to the lack of locking on block->chain_list. > I thought the rcu_barrier() could properly handle this, > but seems still not, probably I need to move it in the loop, > I am still not 100% sure if it

Re: [Patch net v2 2/2] net_sched: fix all the madness of tc filter chain

2017-09-11 Thread Cong Wang
On Sun, Sep 10, 2017 at 7:33 AM, Jiri Pirko wrote: > Fri, Sep 08, 2017 at 06:37:55PM CEST, xiyou.wangc...@gmail.com wrote: >>On Thu, Sep 7, 2017 at 1:52 PM, Jiri Pirko wrote: >>> Thu, Sep 07, 2017 at 07:45:49PM CEST, xiyou.wangc...@gmail.com wrote: Yes it

Re: [Patch net v2 2/2] net_sched: fix all the madness of tc filter chain

2017-09-10 Thread Jiri Pirko
Fri, Sep 08, 2017 at 06:37:55PM CEST, xiyou.wangc...@gmail.com wrote: >On Thu, Sep 7, 2017 at 1:52 PM, Jiri Pirko wrote: >> Thu, Sep 07, 2017 at 07:45:49PM CEST, xiyou.wangc...@gmail.com wrote: >>>Yes it is for chain 0, because block holds a reference to chain 0 during

Re: [Patch net v2 2/2] net_sched: fix all the madness of tc filter chain

2017-09-08 Thread Cong Wang
On Thu, Sep 7, 2017 at 1:52 PM, Jiri Pirko wrote: > Thu, Sep 07, 2017 at 07:45:49PM CEST, xiyou.wangc...@gmail.com wrote: >>Yes it is for chain 0, because block holds a reference to chain 0 during >>creation. Non-0 chains are created with refcnt==1 too but paired with

Re: [Patch net v2 2/2] net_sched: fix all the madness of tc filter chain

2017-09-07 Thread Jiri Pirko
Thu, Sep 07, 2017 at 07:45:49PM CEST, xiyou.wangc...@gmail.com wrote: >On Wed, Sep 6, 2017 at 11:32 PM, Jiri Pirko wrote: >> Thu, Sep 07, 2017 at 06:26:07AM CEST, xiyou.wangc...@gmail.com wrote: >>>This patch fixes the following madness of tc filter chain: >> >> Could you avoid

Re: [Patch net v2 2/2] net_sched: fix all the madness of tc filter chain

2017-09-07 Thread Cong Wang
On Wed, Sep 6, 2017 at 11:32 PM, Jiri Pirko wrote: > Thu, Sep 07, 2017 at 06:26:07AM CEST, xiyou.wangc...@gmail.com wrote: >>This patch fixes the following madness of tc filter chain: > > Could you avoid expressive words like "madness" and such? > Please be technical. > If the

Re: [Patch net v2 2/2] net_sched: fix all the madness of tc filter chain

2017-09-07 Thread Jiri Pirko
Thu, Sep 07, 2017 at 06:26:07AM CEST, xiyou.wangc...@gmail.com wrote: >This patch fixes the following madness of tc filter chain: Could you avoid expressive words like "madness" and such? Please be technical. > >1) tcf_chain_destroy() is called by both tcf_block_put() and > tcf_chain_put().

[Patch net v2 2/2] net_sched: fix all the madness of tc filter chain

2017-09-06 Thread Cong Wang
This patch fixes the following madness of tc filter chain: 1) tcf_chain_destroy() is called by both tcf_block_put() and tcf_chain_put(). tcf_chain_put() is correctly refcnt'ed and paired with tcf_chain_get(), but tcf_block_put() is not, it should be paired with tcf_block_get() which