* [PATCH] vlan: allow creating vlan when real device is not up
@ 2009-07-30 18:23 Stephen Hemminger
2009-07-30 20:17 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2009-07-30 18:23 UTC (permalink / raw)
To: Patrick McHardy, David Miller; +Cc: netdev
There is no reason for the arbitrary restriction that device must be
up to create a vlan. This patch was added to Vyatta kernel to resolve startup
ordering issues where vlan's are created but real device was disabled.
Note: the vlan already correctly inherits the operstate from real device; so
if vlan is created and real device is marked down, the vlan is marked
down.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/8021q/vlan.c 2009-07-30 11:15:34.983190412 -0700
+++ b/net/8021q/vlan.c 2009-07-30 11:16:03.590055942 -0700
@@ -225,12 +225,6 @@ int vlan_check_real_dev(struct net_devic
return -EOPNOTSUPP;
}
- /* The real device must be up and operating in order to
- * assosciate a VLAN device with it.
- */
- if (!(real_dev->flags & IFF_UP))
- return -ENETDOWN;
-
if (__find_vlan_dev(real_dev, vlan_id) != NULL)
return -EEXIST;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vlan: allow creating vlan when real device is not up
2009-07-30 18:23 [PATCH] vlan: allow creating vlan when real device is not up Stephen Hemminger
@ 2009-07-30 20:17 ` David Miller
2009-07-31 12:16 ` Patrick McHardy
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2009-07-30 20:17 UTC (permalink / raw)
To: shemminger; +Cc: kaber, netdev
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Thu, 30 Jul 2009 11:23:21 -0700
> There is no reason for the arbitrary restriction that device must be
> up to create a vlan. This patch was added to Vyatta kernel to resolve startup
> ordering issues where vlan's are created but real device was disabled.
>
> Note: the vlan already correctly inherits the operstate from real device; so
> if vlan is created and real device is marked down, the vlan is marked
> down.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Looks fine, added to net-next-2.6
We can revert if Patrick or someone else finds a potential problem
with allowing this.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vlan: allow creating vlan when real device is not up
2009-07-30 20:17 ` David Miller
@ 2009-07-31 12:16 ` Patrick McHardy
0 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2009-07-31 12:16 UTC (permalink / raw)
To: David Miller; +Cc: shemminger, netdev
David Miller wrote:
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Thu, 30 Jul 2009 11:23:21 -0700
>
>> There is no reason for the arbitrary restriction that device must be
>> up to create a vlan. This patch was added to Vyatta kernel to resolve startup
>> ordering issues where vlan's are created but real device was disabled.
>>
>> Note: the vlan already correctly inherits the operstate from real device; so
>> if vlan is created and real device is marked down, the vlan is marked
>> down.
>>
>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> Looks fine, added to net-next-2.6
>
> We can revert if Patrick or someone else finds a potential problem
> with allowing this.
It seems perfectly fine to me, we can get to the same state by
setting the lower device down after creating the VLAN device.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-31 12:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 18:23 [PATCH] vlan: allow creating vlan when real device is not up Stephen Hemminger
2009-07-30 20:17 ` David Miller
2009-07-31 12:16 ` Patrick McHardy
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).