All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pravin Shelar <pshelar@nicira.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH net 1/2] vxlan: unregister on namespace exit
Date: Thu, 18 Jul 2013 11:28:14 -0700	[thread overview]
Message-ID: <CALnjE+p_TvGYuEQw1U8kVAMOxMWTBB0wxhXYoE-LWv8cTvxknA@mail.gmail.com> (raw)
In-Reply-To: <20130718095828.715cc9f4@nehalam.linuxnetplumber.net>

On Thu, Jul 18, 2013 at 9:58 AM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Thu, 18 Jul 2013 09:40:07 -0700
> Pravin Shelar <pshelar@nicira.com> wrote:
>
>> On Thu, Jul 18, 2013 at 8:38 AM, Stephen Hemminger
>> <stephen@networkplumber.org> wrote:
>> > Fix memory leaks and other badness from VXLAN network namespace
>> > teardown. When network namespace is removed, all the vxlan devices should
>> > be unregistered (not closed).
>> >
>> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>> >
>> >
>> > --- a/drivers/net/vxlan.c       2013-07-17 16:32:10.826955800 -0700
>> > +++ b/drivers/net/vxlan.c       2013-07-17 16:47:35.275690741 -0700
>> > @@ -1878,10 +1878,12 @@ static __net_exit void vxlan_exit_net(st
>> >  {
>> >         struct vxlan_net *vn = net_generic(net, vxlan_net_id);
>> >         struct vxlan_dev *vxlan;
>> > +       LIST_HEAD(list);
>> >
>> >         rtnl_lock();
>> > -       list_for_each_entry(vxlan, &vn->vxlan_list, next)
>> > -               dev_close(vxlan->dev);
>> > +       list_for_each_entry(vxlan, &vn->vxlan_list, next)
>> > +               unregister_netdevice_queue(vxlan->dev, &list);
>> > +       unregister_netdevice_many(&list);
>> >         rtnl_unlock();
>> >  }
>> >
>> Looks good.
>> Reviewed-by: Pravin B Shelar <pshelar@nicira.com>
>
> vxlan might be a candidate for integration with the generic ip_tunnel
> code, but haven't looked at all the details.

ip_tunnel already does same on net-exit.

  reply	other threads:[~2013-07-18 18:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 15:38 [PATCH net 1/2] vxlan: unregister on namespace exit Stephen Hemminger
2013-07-18 15:40 ` [PATCH net 2/2] vxlan: fix igmp races Stephen Hemminger
2013-07-18 20:15   ` David Miller
2013-07-18 16:40 ` [PATCH net 1/2] vxlan: unregister on namespace exit Pravin Shelar
2013-07-18 16:58   ` Stephen Hemminger
2013-07-18 18:28     ` Pravin Shelar [this message]
2013-07-18 20:15 ` David Miller

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=CALnjE+p_TvGYuEQw1U8kVAMOxMWTBB0wxhXYoE-LWv8cTvxknA@mail.gmail.com \
    --to=pshelar@nicira.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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 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.