Re: [PATCH 06/14] net: sched: implement reference counted action release

2018-05-20 Thread Vlad Buslov
On Sun 20 May 2018 at 06:22, Jiri Pirko wrote: > Sat, May 19, 2018 at 11:43:27PM CEST, marcelo.leit...@gmail.com wrote: >>On Mon, May 14, 2018 at 05:27:07PM +0300, Vlad Buslov wrote: >>... >>> @@ -1052,6 +1088,36 @@ static int tca_action_flush(struct net *net, struct >>>

Re: [PATCH 06/14] net: sched: implement reference counted action release

2018-05-20 Thread Jiri Pirko
Sat, May 19, 2018 at 11:43:27PM CEST, marcelo.leit...@gmail.com wrote: >On Mon, May 14, 2018 at 05:27:07PM +0300, Vlad Buslov wrote: >... >> @@ -1052,6 +1088,36 @@ static int tca_action_flush(struct net *net, struct >> nlattr *nla, >> return err; >> } >> >> +static int

Re: [PATCH 06/14] net: sched: implement reference counted action release

2018-05-19 Thread Marcelo Ricardo Leitner
On Mon, May 14, 2018 at 05:27:07PM +0300, Vlad Buslov wrote: ... > @@ -1052,6 +1088,36 @@ static int tca_action_flush(struct net *net, struct > nlattr *nla, > return err; > } > > +static int tcf_action_delete(struct net *net, struct list_head *actions, > + struct

Re: [PATCH 06/14] net: sched: implement reference counted action release

2018-05-15 Thread Vlad Buslov
On Tue 15 May 2018 at 09:03, Jiri Pirko wrote: > Mon, May 14, 2018 at 09:07:06PM CEST, vla...@mellanox.com wrote: >> >>On Mon 14 May 2018 at 16:47, Jiri Pirko wrote: >>> Mon, May 14, 2018 at 04:27:07PM CEST, vla...@mellanox.com wrote: >>> >>> [...] >>> >>>

Re: [PATCH 06/14] net: sched: implement reference counted action release

2018-05-15 Thread Jiri Pirko
Mon, May 14, 2018 at 09:07:06PM CEST, vla...@mellanox.com wrote: > >On Mon 14 May 2018 at 16:47, Jiri Pirko wrote: >> Mon, May 14, 2018 at 04:27:07PM CEST, vla...@mellanox.com wrote: >> >> [...] >> >> >>>+static int tcf_action_del_1(struct net *net, char *kind, u32 index, >>>+

Re: [PATCH 06/14] net: sched: implement reference counted action release

2018-05-14 Thread Vlad Buslov
On Mon 14 May 2018 at 16:47, Jiri Pirko wrote: > Mon, May 14, 2018 at 04:27:07PM CEST, vla...@mellanox.com wrote: > > [...] > > >>+static int tcf_action_del_1(struct net *net, char *kind, u32 index, >>+ struct netlink_ext_ack *extack) >>+{ >>+ const

Re: [PATCH 06/14] net: sched: implement reference counted action release

2018-05-14 Thread Jiri Pirko
Mon, May 14, 2018 at 04:27:07PM CEST, vla...@mellanox.com wrote: [...] >+static int tcf_action_del_1(struct net *net, char *kind, u32 index, >+ struct netlink_ext_ack *extack) >+{ >+ const struct tc_action_ops *ops; >+ int err = -EINVAL; >+ >+ ops =

Re: [PATCH 06/14] net: sched: implement reference counted action release

2018-05-14 Thread Jiri Pirko
Mon, May 14, 2018 at 04:27:07PM CEST, vla...@mellanox.com wrote: >Implement helper function to delete action using new action ops delete >function implemented by each action for lockless execution. Reading this sentense for 4 times. I still don't understand what you say :( > >Implement action

[PATCH 06/14] net: sched: implement reference counted action release

2018-05-14 Thread Vlad Buslov
Implement helper function to delete action using new action ops delete function implemented by each action for lockless execution. Implement action put function that releases reference to action and frees it if necessary. Refactor action deletion code to use new put function and not to rely on