From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pieter Jansen van Vuuren Subject: Re: [PATCH net-next v6 3/3] act_vlan: VLAN action rewrite to use RCU lock/unlock and update Date: Mon, 6 Nov 2017 18:37:31 +0000 Message-ID: <20171106183731.3e1e88fc@pieter-Netronome> References: <1509724247-5721-1-git-send-email-manish.kurup@verizon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net, jakub.kicinski@netronome.com, simon.horman@netronome.com, john.hurley@netronome.com, oss-drivers@netronome.com, netdev@vger.kernel.org, aring@mojatatu.com, mrv@mojatatu.com, Manish Kurup To: Manish Kurup Return-path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:43773 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932521AbdKFShg (ORCPT ); Mon, 6 Nov 2017 13:37:36 -0500 Received: by mail-wm0-f67.google.com with SMTP id r68so10292329wmr.0 for ; Mon, 06 Nov 2017 10:37:35 -0800 (PST) In-Reply-To: <1509724247-5721-1-git-send-email-manish.kurup@verizon.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 3 Nov 2017 11:50:47 -0400 Manish Kurup 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 > Acked-by: Jiri Pirko > Signed-off-by: Manish Kurup > --- > 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.