From: Daniel Borkmann <dborkman@redhat.com>
To: Cong Wang <cwang@twopensource.com>
Cc: David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH v3 net-next] net: vxlan: when lower dev unregisters remove vxlan dev as well
Date: Sat, 11 Jan 2014 09:46:58 +0100 [thread overview]
Message-ID: <52D10502.1000308@redhat.com> (raw)
In-Reply-To: <CAHA+R7NB8sz1-W=QEmGxQkRyUmcMM6BzE7pZNU0W2_jzDfJjNw@mail.gmail.com>
On 01/11/2014 01:49 AM, Cong Wang wrote:
> On Fri, Jan 10, 2014 at 2:35 PM, Daniel Borkmann <dborkman@redhat.com> wrote:
>> @@ -2673,13 +2712,14 @@ static __net_init int vxlan_init_net(struct net *net)
>> static __net_exit void vxlan_exit_net(struct net *net)
>> {
>> struct vxlan_net *vn = net_generic(net, vxlan_net_id);
>> - struct vxlan_dev *vxlan;
>> - LIST_HEAD(list);
>> + struct vxlan_dev *vxlan, *next;
>> + LIST_HEAD(list_kill);
>>
>> rtnl_lock();
>> - list_for_each_entry(vxlan, &vn->vxlan_list, next)
>> - unregister_netdevice_queue(vxlan->dev, &list);
>> - unregister_netdevice_many(&list);
>> + list_for_each_entry_safe(vxlan, next, &vn->vxlan_list, next)
>> + vxlan_dellink(vxlan->dev, &list_kill);
>> + unregister_netdevice_many(&list_kill);
>> + list_del(&list_kill);
>
> The last list_del() looks suspicous... Since list_kill is a local list head,
> why do we need to delete the head at the end??
Cong, maybe I'm missing something, but we're doing this rtnl_dellink()
and elsewehere, e.g. commit 226bd341147 ("net: use batched device unregister
in veth and macvlan").
next prev parent reply other threads:[~2014-01-11 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-10 22:35 [PATCH v3 net-next] net: vxlan: when lower dev unregisters remove vxlan dev as well Daniel Borkmann
2014-01-11 0:49 ` Cong Wang
2014-01-11 8:46 ` Daniel Borkmann [this message]
2014-01-11 19:03 ` Cong Wang
2014-01-11 19:47 ` Daniel Borkmann
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=52D10502.1000308@redhat.com \
--to=dborkman@redhat.com \
--cc=cwang@twopensource.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).