public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber•org>
To: Cong Wang <xiyou.wangcong@gmail•com>
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH net-next v4 2/2] vxlan: allow specifying multiple default destinations
Date: Mon, 24 Jun 2013 08:18:18 -0700	[thread overview]
Message-ID: <20130624081818.2693ef68@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <kq8q3h$9lu$1@ger.gmane.org>

On Mon, 24 Jun 2013 06:48:17 +0000 (UTC)
Cong Wang <xiyou.wangcong@gmail•com> wrote:

> > +static int vxlan_fill_remotes_info(struct sk_buff *skb,
> > +				   const struct vxlan_dev *vxlan)
> > +{
> > +	struct vxlan_rdst *rd;
> > +	struct nlattr *nest, *rdst_nest;
> > +	__be32 ip;
> > +	int i = 1;
> > +
> > +	if (!vxlan->remotes_cnt)
> > +		return 0;
> > +
> > +	nest = nla_nest_start(skb, IFLA_VXLAN_REMOTES);
> > +	if (nest == NULL)
> > +		goto nla_put_failure;
> > +
> > +	list_for_each_entry_rcu(rd, &vxlan->remotes, list) {  
> 
> 
> Need RCU read lock here?

RCU is unnecessary here since already protected by RTNL.
 
rtnl_fill_ifinfo
   ASSERT_RTNL()
   rtnl_link_fill
      vxlan_fill_info
         vxlan_fill_remotes_info

Better just to remove the for_each_entry_rcu and use for_each_entry

  parent reply	other threads:[~2013-06-24 15:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-23 16:22 [PATCH net-next v4 0/2] vxlan: allow specifying multiple default destinations Mike Rapoport
2013-06-23 16:22 ` [PATCH net-next v4 1/2] vxlan: introduce vxlan_rdst_append Mike Rapoport
2013-06-24  6:02   ` Cong Wang
2013-06-24  6:54     ` Mike Rapoport
2013-06-24  8:28       ` David Miller
2013-06-24  7:21     ` Mike Rapoport
2013-06-23 16:22 ` [PATCH net-next v4 2/2] vxlan: allow specifying multiple default destinations Mike Rapoport
2013-06-24  0:14   ` Stephen Hemminger
2013-06-24  5:57     ` Mike Rapoport
2013-06-24 15:35       ` Stephen Hemminger
2013-06-24 19:52         ` Mike Rapoport
2013-06-24 20:24           ` Stephen Hemminger
2013-06-24  6:48   ` Cong Wang
2013-06-24  6:58     ` Mike Rapoport
2013-06-24 15:18     ` Stephen Hemminger [this message]
2013-06-23 16:24 ` [PATCH iproute2 1/2] vxlan: introduce vxlan_parse_opt_create Mike Rapoport
2013-06-23 16:24 ` [PATCH iproute2 2/2] vxlan: allow specifying multiple default destinations Mike Rapoport
2013-06-24  0:32   ` Cong Wang
2013-06-24  5:40     ` Mike Rapoport

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=20130624081818.2693ef68@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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