All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Mike Rapoport <mike.rapoport@ravellosystems.com>
Cc: netdev@vger.kernel.org, David Stevens <dlstevens@us.ibm.com>,
	Thomas Graf <tgraf@suug.ch>
Subject: Re: [PATCH net-next v4 2/2] vxlan: allow specifying multiple default destinations
Date: Sun, 23 Jun 2013 17:14:40 -0700	[thread overview]
Message-ID: <20130623171440.439356b7@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1372004543-24675-3-git-send-email-mike.rapoport@ravellosystems.com>

On Sun, 23 Jun 2013 19:22:23 +0300
Mike Rapoport <mike.rapoport@ravellosystems.com> wrote:

> A list of multiple default destinations can be used in environments that
> disable multicast on the infrastructure level, e.g. public clouds.
> 
> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
> ---
>  drivers/net/vxlan.c          | 268 +++++++++++++++++++++++++++++++++++++++++--
>  include/uapi/linux/if_link.h |  17 +++
>  2 files changed, 276 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index e5fb6568..f57a0d94 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -103,6 +103,7 @@ struct vxlan_rdst {
>  	u32			 remote_vni;
>  	u32			 remote_ifindex;
>  	struct list_head	 list;
> +	struct rcu_head		 rcu;
>  };

The use of remotes_cnt here is not SMP safe.
You are using remotes_cnt to size the buffer for dumping, but then the list
of remotes might change during the dump.

There a a couple of alternatives here:
1. Put a hard limit on the number of remotes per MAC.
2. When there are multiple destnations, just dump multiple entries, like
   multipath routing does.

I prefer #2 because it also allows for a cleaner API on creation.

  reply	other threads:[~2013-06-24  0:14 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 [this message]
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
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=20130623171440.439356b7@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=dlstevens@us.ibm.com \
    --cc=mike.rapoport@ravellosystems.com \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.