From: Mike Rapoport <mike.rapoport@ravellosystems.com>
To: Atzm Watanabe <atzm@stratosphere.co.jp>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] vxlan: allow specifying multiple default destinations
Date: Sun, 28 Apr 2013 01:57:12 +0300 [thread overview]
Message-ID: <20130427225712.GA6772@zed> (raw)
In-Reply-To: <87txmtpyje.wl%atzm@stratosphere.co.jp>
On Fri, Apr 26, 2013 at 03:59:49PM +0900, Atzm Watanabe wrote:
> At Thu, 25 Apr 2013 14:03:49 +0300,
> Mike Rapoport wrote:
> > +/* Add remote to default destinations list */
> > +static int vxlan_remote_add(struct vxlan_dev *vxlan, struct nlattr *attr)
> > +{
...
> > +}
>
> I think the default destinations should be used for not only sending
> but receiving, so when multicast address was added, it should be
> joined to the group, if the interface state is up.
> (Forbidding the change on the running interface may make it easy.)
>
> Also vxlan_open() and vxlan_stop() will need to control the
> membership of groups in the default destination list.
My original idea was to simulate multicast group with a list of unicast
destinations for cases when multicast is impossible. I'd prefer to limit
the additional destinations for unicast addresses for now. The support
for several multicast groups with the same VNI can be added later on,
IMHO.
>
> > /* See if multicast group is already in use by other ID */
> > static bool vxlan_group_used(struct vxlan_net *vn,
> > @@ -1500,6 +1600,14 @@ static void vxlan_flush(struct vxlan_dev *vxlan)
> > spin_unlock_bh(&vxlan->hash_lock);
> > }
> >
> > +static void vxlan_remotes_flush(struct vxlan_dev *vxlan)
> > +{
> > + struct vxlan_rdst *rd;
> > +
> > + for (rd = vxlan->default_dst.remote_next; rd; rd = rd->remote_next)
> > + vxlan_remote_destroy(vxlan, rd);
> > +}
> > +
> > /* Cleanup timer and forwarding table on shutdown */
> > static int vxlan_stop(struct net_device *dev)
> > {
> > @@ -1511,6 +1619,7 @@ static int vxlan_stop(struct net_device *dev)
> > del_timer_sync(&vxlan->age_timer);
> >
> > vxlan_flush(vxlan);
> > + vxlan_remotes_flush(vxlan);
> >
> > return 0;
> > }
>
> vxlan_stop() is called when interface state changes to down.
> I think the default destinations should not be flushed at this timing,
> and this should be done at dellink instead.
Agree, will fix.
>
> Thanks.
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2013-04-27 22:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-25 11:03 [PATCH net-next 0/2] vxlan: allow specifying multiple default destinations Mike Rapoport
2013-04-25 11:03 ` [PATCH net-next 1/2] vxlan: introduce vxlan_rdst_append Mike Rapoport
2013-04-25 11:03 ` [PATCH net-next 2/2] vxlan: allow specifying multiple default destinations Mike Rapoport
2013-04-26 6:59 ` Atzm Watanabe
2013-04-27 22:57 ` Mike Rapoport [this message]
2013-04-25 11:04 ` [PATCH iproute2] " 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=20130427225712.GA6772@zed \
--to=mike.rapoport@ravellosystems.com \
--cc=atzm@stratosphere.co.jp \
--cc=netdev@vger.kernel.org \
/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