David S. Miller
2007-Apr-18 12:34 UTC
[Bridge] Re: Problem in changed VLAN code can cause systems to hang.
On Thu, 09 Sep 2004 15:16:33 +0200 Mark Ruijter <bridge@siennax.com> wrote:> I noticed that the VLAN code of kernels >=2.6.8 contain the patch needed > to mirror link state information from the real device to the vlan device. > > This however causes the system to hang in combination with net-snmpd. > The last thing that I see is an ioctl(0x8947...What kind of ethernet devices do you have making use of VLAN?
Mark Ruijter
2007-Apr-18 12:34 UTC
[Bridge] Problem in changed VLAN code can cause systems to hang.
Stephen, I noticed that the VLAN code of kernels >=2.6.8 contain the patch needed to mirror link state information from the real device to the vlan device. This however causes the system to hang in combination with net-snmpd. The last thing that I see is an ioctl(0x8947... From the net-snmp code: --- if (ioctl(fd, 0x8947, &ifr) >= 0) { new_ioctl_nums = 1; } else if (ioctl(fd, SIOCDEVPRIVATE, &ifr) >= 0) { new_ioctl_nums = 0; } else { DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIPHY on %s failed\n", ifr.ifr_name)); return retspeed; } --- I suspected the code below so I commented out the SIOCGMIIPHY line: int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; struct ifreq ifrr; int err = -EOPNOTSUPP; strncpy(ifrr.ifr_name, real_dev->name, IFNAMSIZ); ifrr.ifr_ifru = ifr->ifr_ifru; switch(cmd) { //case SIOCGMIIPHY: case SIOCGMIIREG: case SIOCSMIIREG: if (real_dev->do_ioctl && netif_device_present(real_dev)) err = real_dev->do_ioctl(dev, &ifrr, cmd); break; case SIOCETHTOOL: err = dev_ethtool(&ifrr); } if (!err) ifr->ifr_ifru = ifrr.ifr_ifru; return err; } This fixes the problem. I didn't bother to check what this call actually does and why it doesn't work. Mark.
Tommy Christensen
2007-Apr-18 12:34 UTC
[Bridge] Problem in changed VLAN code can cause systems to hang.
On Thu, 2004-09-09 at 15:16, Mark Ruijter wrote:> if (real_dev->do_ioctl && netif_device_present(real_dev)) > err = real_dev->do_ioctl(dev, &ifrr, cmd);I guess do_ioctl should be called with real_dev as parameter here. -Tommy
shemminger@osdl.org
2007-Apr-18 12:34 UTC
[Bridge] Re: Problem in changed VLAN code can cause systems to hang.
> On Thu, 09 Sep 2004 15:16:33 +0200 > Mark Ruijter <bridge@siennax.com> wrote: > >> I noticed that the VLAN code of kernels >=2.6.8 contain the patch needed >> to mirror link state information from the real device to the vlan >> device. >> >> This however causes the system to hang in combination with net-snmpd. >> The last thing that I see is an ioctl(0x8947... > > What kind of ethernet devices do you have making use of VLAN?I suspect the underlying device doesn't support mii interface. If that is true, then the code is doing the right thing (and net-snmp) is being too dependant on MII.