On Mon, Nov 6, 2017 at 10:37 AM, Pieter Jansen van Vuuren
<pieter.jansenvanvuu...@netronome.com> wrote:
> On Fri,  3 Nov 2017 11:50:47 -0400
> Manish Kurup <kurup.man...@gmail.com> wrote:
>
>> Using a spinlock in the VLAN action causes performance issues when the VLAN
>> action is used on multiple cores. Rewrote the VLAN action to use RCU read
>> locking for reads and updates instead.
>>
>> Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
>> Acked-by: Jiri Pirko <j...@mellanox.com>
>> Signed-off-by: Manish Kurup <manish.ku...@verizon.com>
>> ---
>>  include/net/tc_act/tc_vlan.h | 46 +++++++++++++++++++++------
>>  net/sched/act_vlan.c         | 75
>> ++++++++++++++++++++++++++++++-------------- 2 files changed, 88
>> insertions(+), 33 deletions(-)
> ...
>>
>> +static void tcf_vlan_cleanup(struct tc_action *a, int bind)
>> +{
>> +     struct tcf_vlan *v = to_vlan(a);
>> +     struct tcf_vlan_params *p;
>> +
>> +     p = rcu_dereference_protected(v->vlan_p, 1);
>> +     kfree_rcu(p, rcu);
>> +}
>> +
>>  static int tcf_vlan_dump(struct sk_buff *skb, struct tc_action *a,
>>                        int bind, int ref)
>>  {
>>       unsigned char *b = skb_tail_pointer(skb);
>>       struct tcf_vlan *v = to_vlan(a);
>> +     struct tcf_vlan_params *p = rtnl_dereference(v->vlan_p);
> nack. This fails reverse xmas-tree.

Are we really going to be so strict about the reverse xmas-tree that
we won't allow for assignment w/ variable declaration because the
dependency order won't fit into that format?

Last I knew this kind of setup was an exception to the reverse
xmas-tree layout requirement because in this case 'p' relies on 'v' so
we can't reorder these without having to kick the assignment of 'p'
off onto a line by itself.

- Alex

Reply via email to