[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130623171440.439356b7@nehalam.linuxnetplumber.net>
Date: Sun, 23 Jun 2013 17:14:40 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Mike Rapoport <mike.rapoport@...ellosystems.com>
Cc: netdev@...r.kernel.org, David Stevens <dlstevens@...ibm.com>,
Thomas Graf <tgraf@...g.ch>
Subject: Re: [PATCH net-next v4 2/2] vxlan: allow specifying multiple
default destinations
On Sun, 23 Jun 2013 19:22:23 +0300
Mike Rapoport <mike.rapoport@...ellosystems.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@...ellosystems.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists