* [Bridge] Problem in changed VLAN code can cause systems to hang.
@ 2004-09-09 13:16 Mark Ruijter
2004-09-09 15:21 ` [Bridge] " David S. Miller
2004-09-10 12:43 ` [Bridge] " Tommy Christensen
0 siblings, 2 replies; 15+ messages in thread
From: Mark Ruijter @ 2004-09-09 13:16 UTC (permalink / raw)
To: Stephen Hemminger, bridge; +Cc: David S. Miller
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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-09 13:16 [Bridge] Problem in changed VLAN code can cause systems to hang Mark Ruijter
@ 2004-09-09 15:21 ` David S. Miller
2004-09-09 15:33 ` shemminger
2004-09-09 15:34 ` Mark Ruijter
2004-09-10 12:43 ` [Bridge] " Tommy Christensen
1 sibling, 2 replies; 15+ messages in thread
From: David S. Miller @ 2004-09-09 15:21 UTC (permalink / raw)
To: Mark Ruijter; +Cc: davem, bridge, shemminger
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?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-09 15:21 ` [Bridge] " David S. Miller
@ 2004-09-09 15:33 ` shemminger
2004-09-09 15:51 ` David S. Miller
` (2 more replies)
2004-09-09 15:34 ` Mark Ruijter
1 sibling, 3 replies; 15+ messages in thread
From: shemminger @ 2004-09-09 15:33 UTC (permalink / raw)
To: David S. Miller; +Cc: davem, shemminger, bridge
> 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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-09 15:21 ` [Bridge] " David S. Miller
2004-09-09 15:33 ` shemminger
@ 2004-09-09 15:34 ` Mark Ruijter
1 sibling, 0 replies; 15+ messages in thread
From: Mark Ruijter @ 2004-09-09 15:34 UTC (permalink / raw)
To: David S. Miller; +Cc: davem, bridge, shemminger
David S. Miller wrote:
> 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?
The machine that would hang had these cards installed ( and had vlan's
on them) :
eth0: Tigon3 [partno(NA) rev 1002 PHY(5703)] (PCIX:100MHz:64-bit)
10/100/1000BaseT Ethernet 00:0f:20:32:35:53
eth0: HostTXDS[1] RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] Split[0]
WireSpeed[1] TSOcap[1]
eth1: Tigon3 [partno(NA) rev 1002 PHY(5703)] (PCIX:100MHz:64-bit)
10/100/1000BaseT Ethernet 00:0f:20:32:35:52
e1000: eth2: e1000_probe: Intel(R) PRO/1000 Network Connection
e1000: eth3: e1000_probe: Intel(R) PRO/1000 Network Connection
The laptop that I use however shows the same results:
eth0: RealTek RTL8139 at 0xd902a800, 00:02:3f:6e:58:6e, IRQ 19
eth0: Identified 8139 chip type 'RTL-8101'
So I don't think it's related to the hardware.
net-snmp-5.1 will demonstrate the problem right away.
Just start the deamon on the host and type:
snmpwalk -c public -v 2c 127.0.0.1
Mark.
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-09 15:33 ` shemminger
@ 2004-09-09 15:51 ` David S. Miller
2004-09-10 11:56 ` Stephen Hemminger
2004-09-09 15:54 ` Mark Ruijter
2004-09-09 16:00 ` Ben Greear
2 siblings, 1 reply; 15+ messages in thread
From: David S. Miller @ 2004-09-09 15:51 UTC (permalink / raw)
To: shemminger; +Cc: bridge
On Thu, 9 Sep 2004 08:33:58 -0700 (PDT)
shemminger@osdl.org wrote:
> > 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.
It does, it's tg3. And it shouldn't hang the machine, it's not just
hanging userspace. Therefore it is a kernel bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-09 15:33 ` shemminger
2004-09-09 15:51 ` David S. Miller
@ 2004-09-09 15:54 ` Mark Ruijter
2004-09-09 16:00 ` Ben Greear
2 siblings, 0 replies; 15+ messages in thread
From: Mark Ruijter @ 2004-09-09 15:54 UTC (permalink / raw)
To: shemminger; +Cc: davem, David S. Miller, bridge
shemminger@osdl.org wrote:
>>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.
Stephen,
The production system that I use went down completely on this bug.
My laptop didn't go down but it became unstable. (ifconfig -a would
freeze etc.).
net-snmp is not the problem, it just shows it.
However when I type :
mii-tool eth0
SIOCGMIIPHY on 'eth0' failed: Operation not supported
This is the case for all interfaces in the production machine as well as
my laptop.
So you're right about the not supported mii interface. But my point is
that it shouldn't be possible to make the system unstable with an ioctl.
Mark.
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-09 15:33 ` shemminger
2004-09-09 15:51 ` David S. Miller
2004-09-09 15:54 ` Mark Ruijter
@ 2004-09-09 16:00 ` Ben Greear
2 siblings, 0 replies; 15+ messages in thread
From: Ben Greear @ 2004-09-09 16:00 UTC (permalink / raw)
To: shemminger; +Cc: davem, David S. Miller, bridge
shemminger@osdl.org wrote:
>>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.
Why would it cause a hang though? I would expect net-snmp to immediately
fail the IOCTL and continue on it's merry way.
Ben
> _______________________________________________
> Bridge mailing list
> Bridge@lists.osdl.org
> http://lists.osdl.org/mailman/listinfo/bridge
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-09 15:51 ` David S. Miller
@ 2004-09-10 11:56 ` Stephen Hemminger
2004-09-10 12:38 ` Tommy Christensen
2004-09-10 13:02 ` Mark Ruijter
0 siblings, 2 replies; 15+ messages in thread
From: Stephen Hemminger @ 2004-09-10 11:56 UTC (permalink / raw)
To: David S. Miller; +Cc: bridge
I can't reproduce the problem on a test machine (SMP) with eth0 (e100) and eth2 (e1000)
Doesn't seem to hang either with commands or custom program.
[root@dev4-009 root]# vconfig add eth2 1
Added VLAN with VID == 1 to IF -:eth2:-
WARNING: VLAN 1 does not work with many switches,
consider another number if you have problems.
[root@dev4-009 root]# ifconfig eth2:1
eth2:1 Link encap:Ethernet HWaddr 00:03:47:9A:33:D5
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Memory:fa420000-fa440000
[root@dev4-009 root]# mii-tool eth2:1
SIOCGMIIPHY on 'eth2:1' failed: Operation not supported
This is what we would expect since e1000 doesn't support MII ioctl when
running in 1000Gbit mode.
[root@dev4-009 root]# vconfig add eth0 11
Added VLAN with VID == 11 to IF -:eth0:-
[root@dev4-009 root]# mii-tool eth0:11
eth0:11: negotiated 100baseTx-FD, link ok
The e100 link works, and also eth1 (e1000 in 100mbit mode).
If someone can reproduce the problem, please tell me how and/or do it
on a console; it is probably a OOPs.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-10 11:56 ` Stephen Hemminger
@ 2004-09-10 12:38 ` Tommy Christensen
2004-09-10 13:17 ` Stephen Hemminger
2004-09-10 13:02 ` Mark Ruijter
1 sibling, 1 reply; 15+ messages in thread
From: Tommy Christensen @ 2004-09-10 12:38 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, bridge
On Fri, 2004-09-10 at 13:56, Stephen Hemminger wrote:
> [root@dev4-009 root]# mii-tool eth2:1
> SIOCGMIIPHY on 'eth2:1' failed: Operation not supported
This is not the VLAN interface. It is typically named
eth2.1 (or possibly vlan1).
^
-Tommy
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bridge] Problem in changed VLAN code can cause systems to hang.
2004-09-09 13:16 [Bridge] Problem in changed VLAN code can cause systems to hang Mark Ruijter
2004-09-09 15:21 ` [Bridge] " David S. Miller
@ 2004-09-10 12:43 ` Tommy Christensen
2004-09-10 13:14 ` Stephen Hemminger
1 sibling, 1 reply; 15+ messages in thread
From: Tommy Christensen @ 2004-09-10 12:43 UTC (permalink / raw)
To: Mark Ruijter; +Cc: David S. Miller, bridge, Stephen Hemminger
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-10 11:56 ` Stephen Hemminger
2004-09-10 12:38 ` Tommy Christensen
@ 2004-09-10 13:02 ` Mark Ruijter
1 sibling, 0 replies; 15+ messages in thread
From: Mark Ruijter @ 2004-09-10 13:02 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, bridge
> I can't reproduce the problem on a test machine (SMP) with eth0 (e100) and eth2 (e1000)
> Doesn't seem to hang either with commands or custom program.
I'll try to create a little tool to reproduce the problem.
In the mean time, did you try net-snmp and snmpwalk?
Mark.
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bridge] Problem in changed VLAN code can cause systems to hang.
2004-09-10 12:43 ` [Bridge] " Tommy Christensen
@ 2004-09-10 13:14 ` Stephen Hemminger
2004-09-10 13:29 ` Mark Ruijter
2004-09-10 23:01 ` David S. Miller
0 siblings, 2 replies; 15+ messages in thread
From: Stephen Hemminger @ 2004-09-10 13:14 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, bridge, Tommy Christensen
Thanks Tommy, the vlan MII ioctl pass through was passing the wrong device.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--
diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
--- a/net/8021q/vlan_dev.c 2004-09-10 06:12:16 -07:00
+++ b/net/8021q/vlan_dev.c 2004-09-10 06:12:16 -07:00
@@ -772,7 +772,7 @@
case SIOCGMIIREG:
case SIOCSMIIREG:
if (real_dev->do_ioctl && netif_device_present(real_dev))
- err = real_dev->do_ioctl(dev, &ifrr, cmd);
+ err = real_dev->do_ioctl(real_dev, &ifrr, cmd);
break;
case SIOCETHTOOL:
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bridge] Re: Problem in changed VLAN code can cause systems to hang.
2004-09-10 12:38 ` Tommy Christensen
@ 2004-09-10 13:17 ` Stephen Hemminger
0 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2004-09-10 13:17 UTC (permalink / raw)
To: Tommy Christensen; +Cc: David S. Miller, bridge
On 10 Sep 2004 14:38:10 +0200
Tommy Christensen <tommy.christensen@tpack.net> wrote:
> On Fri, 2004-09-10 at 13:56, Stephen Hemminger wrote:
> > [root@dev4-009 root]# mii-tool eth2:1
> > SIOCGMIIPHY on 'eth2:1' failed: Operation not supported
>
> This is not the VLAN interface. It is typically named
> eth2.1 (or possibly vlan1).
> ^
Thanks, brain misfunction...
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bridge] Problem in changed VLAN code can cause systems to hang.
2004-09-10 13:14 ` Stephen Hemminger
@ 2004-09-10 13:29 ` Mark Ruijter
2004-09-10 23:01 ` David S. Miller
1 sibling, 0 replies; 15+ messages in thread
From: Mark Ruijter @ 2004-09-10 13:29 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, bridge, netdev, Tommy Christensen
Stephen Hemminger wrote:
> Thanks Tommy, the vlan MII ioctl pass through was passing the wrong device.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
> --
> diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> --- a/net/8021q/vlan_dev.c 2004-09-10 06:12:16 -07:00
> +++ b/net/8021q/vlan_dev.c 2004-09-10 06:12:16 -07:00
> @@ -772,7 +772,7 @@
> case SIOCGMIIREG:
> case SIOCSMIIREG:
> if (real_dev->do_ioctl && netif_device_present(real_dev))
> - err = real_dev->do_ioctl(dev, &ifrr, cmd);
> + err = real_dev->do_ioctl(real_dev, &ifrr, cmd);
> break;
>
> case SIOCETHTOOL:
>
I tested the patch and it fixes the problem as expected.
Mark.
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bridge] Problem in changed VLAN code can cause systems to hang.
2004-09-10 13:14 ` Stephen Hemminger
2004-09-10 13:29 ` Mark Ruijter
@ 2004-09-10 23:01 ` David S. Miller
1 sibling, 0 replies; 15+ messages in thread
From: David S. Miller @ 2004-09-10 23:01 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, bridge, tommy.christensen
On Fri, 10 Sep 2004 06:14:24 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:
> Thanks Tommy, the vlan MII ioctl pass through was passing the wrong device.
Good eyes Tommy. I looked at that line many times
and couldn't see this obvious error.
Patch applied.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2004-09-10 23:01 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-09 13:16 [Bridge] Problem in changed VLAN code can cause systems to hang Mark Ruijter
2004-09-09 15:21 ` [Bridge] " David S. Miller
2004-09-09 15:33 ` shemminger
2004-09-09 15:51 ` David S. Miller
2004-09-10 11:56 ` Stephen Hemminger
2004-09-10 12:38 ` Tommy Christensen
2004-09-10 13:17 ` Stephen Hemminger
2004-09-10 13:02 ` Mark Ruijter
2004-09-09 15:54 ` Mark Ruijter
2004-09-09 16:00 ` Ben Greear
2004-09-09 15:34 ` Mark Ruijter
2004-09-10 12:43 ` [Bridge] " Tommy Christensen
2004-09-10 13:14 ` Stephen Hemminger
2004-09-10 13:29 ` Mark Ruijter
2004-09-10 23:01 ` David S. Miller
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.