Re: [Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-25 Thread Jamal Hadi Salim
On 17-08-24 07:51 PM, Cong Wang wrote: For TC classes, their ->get() and ->put() are always paired, and the reference counting is completely useless, because: 1) For class modification and dumping paths, we already hold RTNL lock, so all of these ->get(),->change(),->put() are atomic. 2) Fo

Re: [Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-25 Thread Jiri Pirko
Fri, Aug 25, 2017 at 01:51:29AM CEST, xiyou.wangc...@gmail.com wrote: >For TC classes, their ->get() and ->put() are always paired, and the >reference counting is completely useless, because: > >1) For class modification and dumping paths, we already hold RTNL lock, > so all of these ->get(),->ch

Re: [Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-25 Thread Jiri Pirko
Fri, Aug 25, 2017 at 11:18:50AM CEST, f...@strlen.de wrote: >Jiri Pirko wrote: >> Fri, Aug 25, 2017 at 01:51:29AM CEST, xiyou.wangc...@gmail.com wrote: >> >For TC classes, their ->get() and ->put() are always paired, and the >> >reference counting is completely useless, because: >> > >> >1) For cl

Re: [Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-25 Thread Florian Westphal
Jiri Pirko wrote: > Fri, Aug 25, 2017 at 01:51:29AM CEST, xiyou.wangc...@gmail.com wrote: > >For TC classes, their ->get() and ->put() are always paired, and the > >reference counting is completely useless, because: > > > >1) For class modification and dumping paths, we already hold RTNL lock, > >

Re: [Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-25 Thread Jiri Pirko
Fri, Aug 25, 2017 at 01:51:29AM CEST, xiyou.wangc...@gmail.com wrote: >For TC classes, their ->get() and ->put() are always paired, and the >reference counting is completely useless, because: > >1) For class modification and dumping paths, we already hold RTNL lock, > so all of these ->get(),->ch

[Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-24 Thread Cong Wang
For TC classes, their ->get() and ->put() are always paired, and the reference counting is completely useless, because: 1) For class modification and dumping paths, we already hold RTNL lock, so all of these ->get(),->change(),->put() are atomic. 2) For filter bindiing/unbinding, we use other