[VLAN] Adding VLANs to downed interfaces
Stephen Hemminger
shemminger at osdl.org
Fri Sep 1 14:21:53 PDT 2006
On Wed, 30 Aug 2006 19:04:49 -0700
Ben Greear <greearb at candelatech.com> wrote:
> Stephen Hemminger wrote:
> > On Wed, 30 Aug 2006 15:33:23 -0400
> > John Kamenik <jkamenik at patton.com> wrote:
> >
> >> I have a question about applying VLANs to downed interfaces. I know
> >> that the kernel will not let you do it, and was wondering why? I
> >> have created a patch that removes this limitation and applied it to
> >> my system and everything works as I would expect it to. Was this a
> >> fix to a bug I am not currently seeing?
> >>
> >> I am using the 2.6.17 kernel and the attached patch is based on it.
> >> The only file changed was the net/8021q/vlan.c file. The
> >> "register_vlan_device" no longer makes a test to determine if the
> >> real (parent) interface is up.
> >>
> >>
> >> John T. Kamenik (Software Eng.)
> >> jkamenik at patton.com
> >> (301) 975 - 1000 (ext. 168)
> >> Patton Electronics Co.
> >> 7622 Rickenbacker Dr.
> >> Gaithersburg, Md 20879
> >>
> >
> > I would be concerned about devices that do vlan acceleration.
> > The act of adding a vlan causes the device to have to talk to
> > the hardware. Often, the data structures for the hardware are
> > not allocated until after the device is brought up.
> >
> > So if you did this on drivers like sky2, e1000, forcedeth, r8169,
> > s2io, ... your change would crash.
>
> Would this be any different from bouncing an e100 ethX interface when
> VLANs were configured on it? I can't see why we shouldn't be able to
> relax that restriction and allow vlans on downed interfaces....
>
The vlan code should store the tag state and not tell the device if it
isn't running, then trap the device up notifier call and feed the offload
requests then. Don't ask the device to store state about tags when it is down.
--
Stephen Hemminger <shemminger at osdl.org>
More information about the Vlan
mailing list