Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Stefano Brivio
On Tue, 13 Nov 2018 16:53:07 +0100 Stefano Brivio wrote: > But to make that effective, you would need to protect the read too, and > that makes your optimisation not really overzealous I think. > > I'd rather go with an additional comment, if that doesn't become > unreadable. Oh, and of

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Stefano Brivio
On Tue, 13 Nov 2018 13:58:05 + Vlad Buslov wrote: > On Tue 13 Nov 2018 at 13:40, Stefano Brivio wrote: > > On Tue, 13 Nov 2018 13:25:52 + > > Vlad Buslov wrote: > > > >> On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote: > >> > Hi Vlad, > >> > > >> > On Mon, 12 Nov 2018 09:55:45

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Vlad Buslov
On Tue 13 Nov 2018 at 13:40, Stefano Brivio wrote: > On Tue, 13 Nov 2018 13:25:52 + > Vlad Buslov wrote: > >> On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote: >> > Hi Vlad, >> > >> > On Mon, 12 Nov 2018 09:55:45 +0200 >> > Vlad Buslov wrote: >> > >> >> @@ -179,9 +179,25 @@ static

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Stefano Brivio
On Tue, 13 Nov 2018 13:25:52 + Vlad Buslov wrote: > On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote: > > Hi Vlad, > > > > On Mon, 12 Nov 2018 09:55:45 +0200 > > Vlad Buslov wrote: > > > >> @@ -179,9 +179,25 @@ static void tcf_proto_destroy_work(struct work_struct > >> *work) > >>

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Vlad Buslov
On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote: > Hi Vlad, > > On Mon, 12 Nov 2018 09:55:45 +0200 > Vlad Buslov wrote: > >> @@ -179,9 +179,25 @@ static void tcf_proto_destroy_work(struct work_struct >> *work) >> rtnl_unlock(); >> } >> >> +/* Helper function to lock rtnl mutex when

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Stefano Brivio
Hi Vlad, On Mon, 12 Nov 2018 09:55:45 +0200 Vlad Buslov wrote: > @@ -179,9 +179,25 @@ static void tcf_proto_destroy_work(struct work_struct > *work) > rtnl_unlock(); > } > > +/* Helper function to lock rtnl mutex when specified condition is true and > mutex > + * hasn't been locked

[PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-11 Thread Vlad Buslov
As a preparation for registering rules update netlink handlers as unlocked, conditionally take rtnl in following cases: - Parent qdisc doesn't support unlocked execution. - Requested classifier type doesn't support unlocked execution. - User requested to flash whole chain using old filter update