Re: [PATCH net-next 04/12] net: sched: flower: track filter deletion with flag

2019-02-15 Thread Vlad Buslov
On Thu 14 Feb 2019 at 20:49, Stefano Brivio wrote: > On Thu, 14 Feb 2019 09:47:04 +0200 > Vlad Buslov wrote: > >> +static int __fl_delete(struct tcf_proto *tp, struct cls_fl_filter *f, >> + bool *last, struct netlink_ext_ack *extack) > > This would be easier to follow (at leas

Re: [PATCH net-next 04/12] net: sched: flower: track filter deletion with flag

2019-02-14 Thread Stefano Brivio
On Thu, 14 Feb 2019 09:47:04 +0200 Vlad Buslov wrote: > +static int __fl_delete(struct tcf_proto *tp, struct cls_fl_filter *f, > +bool *last, struct netlink_ext_ack *extack) This would be easier to follow (at least for me): > { > struct cls_fl_head *head = fl_head_der

[PATCH net-next 04/12] net: sched: flower: track filter deletion with flag

2019-02-13 Thread Vlad Buslov
In order to prevent double deletion of filter by concurrent tasks when rtnl lock is not used for synchronization, add 'deleted' filter field. Check value of this field when modifying filters and return error if concurrent deletion is detected. Refactor __fl_delete() to accept pointer to 'last' boo