Re: [patch net-next v3 06/10] net: sched: introduce helpers to work with filter chains

2017-05-16 Thread Jiri Pirko
Wed, May 17, 2017 at 12:17:11AM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, May 16, 2017 at 10:27 AM, Jiri Pirko wrote: >> +static struct tcf_proto *tcf_chain_tp_prev(struct tcf_chain_info >> *chain_info) >> +{ >> + return rtnl_dereference(*chain_info->pprev); >> +} >> + >> +static void

Re: [patch net-next v3 06/10] net: sched: introduce helpers to work with filter chains

2017-05-16 Thread Cong Wang
On Tue, May 16, 2017 at 10:27 AM, Jiri Pirko wrote: > +static struct tcf_proto *tcf_chain_tp_prev(struct tcf_chain_info *chain_info) > +{ > + return rtnl_dereference(*chain_info->pprev); > +} > + > +static void tcf_chain_tp_insert(struct tcf_chain *chain, > + st

[patch net-next v3 06/10] net: sched: introduce helpers to work with filter chains

2017-05-16 Thread Jiri Pirko
From: Jiri Pirko Introduce struct tcf_chain object and set of helpers around it. Wraps up insertion, deletion and search in the filter chain. Signed-off-by: Jiri Pirko --- include/net/sch_generic.h | 7 ++- net/sched/cls_api.c | 148 +- 2 fil