netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Manish Kurup <kurup.manish@gmail.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>, David Miller <davem@davemloft.net>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Simon Horman <simon.horman@netronome.com>,
	john.hurley@netronome.com, oss-drivers@netronome.com,
	Netdev <netdev@vger.kernel.org>,
	aring@mojatatu.com, Roman Mashak <mrv@mojatatu.com>,
	Manish Kurup <manish.kurup@verizon.com>
Subject: Re: [PATCH net-next v6 3/3] act_vlan: VLAN action rewrite to use RCU lock/unlock and update
Date: Tue, 7 Nov 2017 17:08:16 +0000	[thread overview]
Message-ID: <20171107170816.5e2da39e@pieter-Netronome> (raw)
In-Reply-To: <CAKgT0Udx73GNT39aHrmsaXbqGhiMxejygAQxUg3FM5Rm=ZpfKg@mail.gmail.com>

On Tue, 7 Nov 2017 08:54:20 -0800
Alexander Duyck <alexander.duyck@gmail.com> wrote:

> On Mon, Nov 6, 2017 at 10:37 AM, Pieter Jansen van Vuuren
> <pieter.jansenvanvuuren@netronome.com> wrote:
> > On Fri,  3 Nov 2017 11:50:47 -0400
> > Manish Kurup <kurup.manish@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 <jhs@mojatatu.com>
> >> Acked-by: Jiri Pirko <jiri@mellanox.com>
> >> Signed-off-by: Manish Kurup <manish.kurup@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?
Okay, I think that is a fair point. I would be okay by making an exception
for this.
> 
> 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.
I was actually not aware of this, thank you for pointing it out. It does
make sense.
> 
> - Alex

  reply	other threads:[~2017-11-07 17:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 15:50 [PATCH net-next v6 3/3] act_vlan: VLAN action rewrite to use RCU lock/unlock and update Manish Kurup
2017-11-06 18:37 ` Pieter Jansen van Vuuren
2017-11-07 16:54   ` Alexander Duyck
2017-11-07 17:08     ` Pieter Jansen van Vuuren [this message]
2017-11-08  0:07     ` David Miller
     [not found]       ` <CAJrKpLZenHyuZimWE0CfHePFktB0B-7sa-BO1ff29sXqtiN7EA@mail.gmail.com>
2017-11-08 11:43         ` Fwd: " Manish Kurup
2017-11-08 12:13         ` Manish Kurup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171107170816.5e2da39e@pieter-Netronome \
    --to=pieter.jansenvanvuuren@netronome.com \
    --cc=alexander.duyck@gmail.com \
    --cc=aring@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.hurley@netronome.com \
    --cc=kurup.manish@gmail.com \
    --cc=manish.kurup@verizon.com \
    --cc=mrv@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=simon.horman@netronome.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).