Re: [net-next PATCH v2 1/6] net sched: vlan action fix late binding

2016-05-10 Thread Jamal Hadi Salim
On 16-05-08 11:08 PM, Cong Wang wrote: + if (aexists) + tcf_hash_release(a, bind); Introduce a goto to reduce duplicated cleanup code? I addressed all your comments except for above goto. There are different return codes for all failures - and the clever

Re: [net-next PATCH v2 1/6] net sched: vlan action fix late binding

2016-05-09 Thread Jamal Hadi Salim
On 16-05-08 11:08 PM, Cong Wang wrote: On Sun, May 8, 2016 at 10:26 AM, Jamal Hadi Salim wrote: [..] + aexists = tcf_hash_check(tn, parm->index, a, bind); I think 'exists' is a better name than 'aexists', shorter and clear. aexists is more specific (doesnt quiet apply to this case

Re: [net-next PATCH v2 1/6] net sched: vlan action fix late binding

2016-05-08 Thread Cong Wang
On Sun, May 8, 2016 at 10:26 AM, Jamal Hadi Salim wrote: > diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c > index c1682ab..352653f 100644 > --- a/net/sched/act_vlan.c > +++ b/net/sched/act_vlan.c > @@ -77,7 +77,7 @@ static int tcf_vlan_init(struct net *net, struct nlattr > *nla, >

[net-next PATCH v2 1/6] net sched: vlan action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Late binding was broken and is fixed with this patch. //add a vlan action to pop and give it an instance id of 1 sudo tc actions add action vlan pop index 1 //create filter which binds to vlan action id 1 sudo tc filter add dev $DEV parent : protocol ip prio 1 u32 matc