public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stefan Rompf <stefan@loplof•de>
To: Patrick McHardy <kaber@trash•net>
Cc: Ben Greear <greearb@candelatech•com>,
	Linux Netdev List <netdev@vger•kernel.org>,
	Stephen Hemminger <shemminger@osdl•org>
Subject: Repost: Re: [VLAN]: translate IF_OPER_DORMANT to netif_dormant_on()
Date: Wed, 12 Jul 2006 00:15:17 +0200	[thread overview]
Message-ID: <200607120015.17735.stefan@loplof.de> (raw)
In-Reply-To: <44AE2FCC.6020207@trash.net>

VLAN devices did not get registered as admin up in 2.6.16 and IMHO also
not in 2.6.17. So update patch description.

Ok,

the following patch should fix the problem. Patrick, can you give it a
try? As the bug did not affect me through my testing, I want to be sure it
works now. This is stuff for 2.6.18 and 2.6.17-stable.

Stefan


[VLAN]: Fix link state propagation

When the queue of the underlying device is stopped at initialization time
or the device is marked "not present", the state will be propagated to the
vlan device and never change. Based on an analysis by Patrick McHardy.

Signed-off-by: Stefan Rompf <stefan@loplof•de>

--- linux-2.6.17/net/8021q/vlan.c.orig	2006-07-07 13:00:56.000000000 +0200
+++ linux-2.6.17/net/8021q/vlan.c	2006-07-11 23:20:32.000000000 +0200
@@ -67,10 +67,6 @@ static struct packet_type vlan_packet_ty
 	.func = vlan_skb_recv, /* VLAN receive method */
 };
 
-/* Bits of netdev state that are propagated from real device to virtual */
-#define VLAN_LINK_STATE_MASK \
-	((1<<__LINK_STATE_PRESENT)|(1<<__LINK_STATE_NOCARRIER)|(1<<__LINK_STATE_DORMANT))
-
 /* End of global variables definitions. */
 
 /*
@@ -470,7 +466,9 @@ static struct net_device *register_vlan_
 	new_dev->flags = real_dev->flags;
 	new_dev->flags &= ~IFF_UP;
 
-	new_dev->state = real_dev->state & ~(1<<__LINK_STATE_START);
+	new_dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) |
+					     (1<<__LINK_STATE_DORMANT))) |
+			 (1<<__LINK_STATE_PRESENT); 
 
 	/* need 4 bytes for extra VLAN header info,
 	 * hope the underlying device can handle it.

  parent reply	other threads:[~2006-07-11 22:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200603211829.k2LITMNR029085@hera.kernel.org>
2006-07-04 10:07 ` [VLAN]: translate IF_OPER_DORMANT to netif_dormant_on() Patrick McHardy
2006-07-05 18:57   ` Stefan Rompf
2006-07-05 21:00     ` Patrick McHardy
2006-07-05 21:17       ` Ben Greear
2006-07-06  7:42         ` Patrick McHardy
2006-07-07  9:45           ` Stefan Rompf
2006-07-07  9:56             ` Patrick McHardy
2006-07-07 21:33               ` Stephen Hemminger
2006-07-09  8:49                 ` Stefan Rompf
2006-07-09 18:48                   ` David Miller
2006-07-09 20:05                     ` Krzysztof Halasa
2006-07-10  0:29                       ` David Miller
2006-07-10 11:39                         ` Krzysztof Halasa
2006-07-10  6:17                       ` Stefan Rompf
2006-07-10 12:01                         ` Krzysztof Halasa
2006-07-10 21:58                           ` Stefan Rompf
2006-07-10 16:56                   ` Stephen Hemminger
2006-07-10 17:02                     ` Ben Greear
2006-07-10 22:01                     ` Stefan Rompf
2006-07-11 21:28                       ` [RFC] vlan handling of up/down Stephen Hemminger
2006-07-11 21:47                         ` Ben Greear
2006-07-11 22:19                         ` Stefan Rompf
2006-07-11 22:07               ` [VLAN]: translate IF_OPER_DORMANT to netif_dormant_on() Stefan Rompf
2006-07-11 22:15               ` Stefan Rompf [this message]
2006-07-12  6:50                 ` Repost: " Patrick McHardy
2006-07-19 12:42                 ` Patrick McHardy
2006-07-24 20:52                   ` 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=200607120015.17735.stefan@loplof.de \
    --to=stefan@loplof$(echo .)de \
    --cc=greearb@candelatech$(echo .)com \
    --cc=kaber@trash$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=shemminger@osdl$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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