From: Patrick McHardy <kaber@trash.net>
To: Pavel Emelianov <xemul@openvz.org>
Cc: David Miller <davem@davemloft.net>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/2] Virtual ethernet device driver
Date: Thu, 12 Jul 2007 15:44:59 +0200 [thread overview]
Message-ID: <4696305B.5070809@trash.net> (raw)
In-Reply-To: <46962E6A.5020906@openvz.org>
Pavel Emelianov wrote:
> Patrick McHardy wrote:
>
>>No, to get unique names the sequence has to be:
>>
>>dev_alloc_name
>>register_netdevice
>>dev_alloc_name
>>register_netdevice
>>
>>But you have:
>>
>>dev_alloc_name
>>dev_alloc_name (<- might allocate same name as first call)
>>register_netdevice
>>register_netdevice
>
>
> Oops :) You're right. That's the problem. I was carried away by
> testing the "peer" options and checking for names rather than
> "veth%d" to work...
>
> By the way, that will create some problems. You see, your patches
> imply that the register_netdevice() will be called at the very end
> of the ->newlink callback. Otherwise, the error path of any code
> following the registering will have to call unregister_netdevice()
> which will BUG() in free_netdev() in rtnl_newlink() - the device
> state will be neither UNINITIALIZED nor UNREGISTERED :(
Thats true. I think you could do:
- use name of the supplied device for the second device
- register second device
- allocate new name for first device
- register first device
next prev parent reply other threads:[~2007-07-12 13:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 9:13 [PATCH 0/2] Virtual ethernet device (v3) Pavel Emelianov
2007-07-12 9:17 ` [PATCH 1/2] Introduce the generic rtnl_create_link() Pavel Emelianov
2007-07-12 9:19 ` [PATCH 2/2] Virtual ethernet device driver Pavel Emelianov
2007-07-12 12:31 ` Patrick McHardy
2007-07-12 13:14 ` Pavel Emelianov
2007-07-12 13:21 ` Patrick McHardy
2007-07-12 13:36 ` Pavel Emelianov
2007-07-12 13:44 ` Patrick McHardy [this message]
2007-07-12 13:58 ` Pavel Emelianov
2007-07-12 13:17 ` Pavel Emelianov
2007-07-12 13:24 ` Patrick McHardy
2007-07-16 9:10 ` Pavel Emelianov
2007-07-12 13:51 ` Patrick McHardy
2007-07-12 14:01 ` Pavel Emelianov
2007-07-12 14:10 ` Patrick McHardy
2007-07-16 9:16 ` Pavel Emelianov
2007-07-16 13:13 ` Patrick McHardy
2007-07-12 9:21 ` [PATCH 0/2] Module for ip utility to support veth device (v.3) Pavel Emelianov
2007-07-12 9:23 ` [PATCH 1/2] Intruduce iplink_parse() routine Pavel Emelianov
2007-07-12 9:25 ` [PATCH 2/2] Module for ip utility to support veth device Pavel Emelianov
-- strict thread matches above, loose matches on Subject: below --
2007-07-19 9:24 [PATCH] Virtual ethernet device (v.4) Pavel Emelyanov
2007-07-19 9:28 ` [PATCH 2/2] Virtual ethernet device driver Pavel Emelyanov
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=4696305B.5070809@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=xemul@openvz.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.