Discussion:
Adding qdiscs crashes kernel??
Leigh Sharpe
2007-12-05 04:36:48 UTC
Permalink
Hi all,
I'm having some problems setting up qdiscs on a bridge.The config looks
a little like this:


ifconfig ifb0 up # Bring up the IFB for this bridge.
tc qdisc add dev eth2 ingress
tc qdisc add dev eth3 ingress
tc qdisc add dev ifb0 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
# Raw qdiscs on each bridge port
tc qdisc add dev eth2 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
tc qdisc add dev eth3 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8

tc filter add dev eth2 parent 1: protocol 0x8100 prio 5 u32 match u16
3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 #
mark packets for VLAN 3000.
tc filter add dev eth3 parent 1: protocol 0x8100 prio 5 u32 match u16
3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 #
mark packets for VLAN 3000.

tc class add dev eth2 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded isolated # 2000 Kbit rate limit on entry point.
tc class add dev eth3 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded isolated # 2000 Kbit rate limit on entry point.

tc qdisc add dev eth2 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc qdisc add dev eth3 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc class add dev eth2 parent 2:0 classid 2:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 2 allot 1514 cell 8 maxburst 20 avpkt 1000
sharing
tc filter add dev eth2 parent 2:0 protocol 0x8100 prio 2 u32 match u16
3000 0x0fff at 0 flowid 2:1 action ipt -j MARK --or-mark 0x00100000
tc qdisc add dev eth2 parent 2:1 handle 3: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc filter add dev eth2 parent 3:0 protocol 0x8100 prio 4 u32 match u32 0
0 flowid 3:3 # Traffic
class 3 - catchall. Don't MARK further.

(There's lot's more, mostly a repeat of the above with different
criteria.)
When I first boot the box, and apply the traffic shaping before any
traffic flows, all is fine. However, if I apply this same config whilst
the bridge is passing lots of traffic, it completely crashes the box.
Everything freezes, I don't even get a kernel panic message on the
console. Nothing responds and the only way to recover is by a
power-cycle.

If I take the link down on the ethernet port (with ip link set ethx
down), apply the configs, and then bring it back up again, all is OK.
Obviously, though, this isn't really acceptable.

It always crashes immediately after a 'tc qdisc add...' line, but not
always in the same place. Are there any known issues with adding qdiscs
whilst traffic is being queued on it?
I've also tried it using HTB instead of CBQ, and I get the same results.

Anybody got any other ideas as to what might be going on?

Regards,
Leigh

Leigh Sharpe
Network Systems Engineer
Pacific Wireless
Ph +61 3 9584 8966
Mob 0408 009 502
Helpdesk 1300 300 616
email ***@pacificwireless.com.au
<blocked::mailto:***@pacificwireless.com.au>
web www.pacificwireless.com.au
<blocked::http://www.pacificwireless.com.au/>
Leigh Sharpe
2007-12-05 04:40:47 UTC
Permalink
Oh,
kernel version 2.6.23, since I forgot to mention it.

Leigh.

________________________________

From: lartc-***@mailman.ds9a.nl
[mailto:lartc-***@mailman.ds9a.nl] On Behalf Of Leigh Sharpe
Sent: Wednesday, 5 December 2007 3:37 PM
To: ***@mailman.ds9a.nl
Subject: [LARTC] Adding qdiscs crashes kernel??


Hi all,
I'm having some problems setting up qdiscs on a bridge.The config looks
a little like this:


ifconfig ifb0 up # Bring up the IFB for this bridge.
tc qdisc add dev eth2 ingress
tc qdisc add dev eth3 ingress
tc qdisc add dev ifb0 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
# Raw qdiscs on each bridge port
tc qdisc add dev eth2 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
tc qdisc add dev eth3 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8

tc filter add dev eth2 parent 1: protocol 0x8100 prio 5 u32 match u16
3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 #
mark packets for VLAN 3000.
tc filter add dev eth3 parent 1: protocol 0x8100 prio 5 u32 match u16
3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 #
mark packets for VLAN 3000.

tc class add dev eth2 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded isolated # 2000 Kbit rate limit on entry point.
tc class add dev eth3 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded isolated # 2000 Kbit rate limit on entry point.

tc qdisc add dev eth2 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc qdisc add dev eth3 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc class add dev eth2 parent 2:0 classid 2:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 2 allot 1514 cell 8 maxburst 20 avpkt 1000
sharing
tc filter add dev eth2 parent 2:0 protocol 0x8100 prio 2 u32 match u16
3000 0x0fff at 0 flowid 2:1 action ipt -j MARK --or-mark 0x00100000
tc qdisc add dev eth2 parent 2:1 handle 3: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc filter add dev eth2 parent 3:0 protocol 0x8100 prio 4 u32 match u32 0
0 flowid 3:3 # Traffic
class 3 - catchall. Don't MARK further.

(There's lot's more, mostly a repeat of the above with different
criteria.)
When I first boot the box, and apply the traffic shaping before any
traffic flows, all is fine. However, if I apply this same config whilst
the bridge is passing lots of traffic, it completely crashes the box.
Everything freezes, I don't even get a kernel panic message on the
console. Nothing responds and the only way to recover is by a
power-cycle.

If I take the link down on the ethernet port (with ip link set ethx
down), apply the configs, and then bring it back up again, all is OK.
Obviously, though, this isn't really acceptable.

It always crashes immediately after a 'tc qdisc add...' line, but not
always in the same place. Are there any known issues with adding qdiscs
whilst traffic is being queued on it?
I've also tried it using HTB instead of CBQ, and I get the same results.

Anybody got any other ideas as to what might be going on?

Regards,
Leigh

Leigh Sharpe
Network Systems Engineer
Pacific Wireless
Ph +61 3 9584 8966
Mob 0408 009 502
Helpdesk 1300 300 616
email ***@pacificwireless.com.au
<blocked::mailto:***@pacificwireless.com.au>
web www.pacificwireless.com.au
<blocked::http://www.pacificwireless.com.au/>
Patrick McHardy
2007-12-05 08:07:55 UTC
Permalink
Post by Leigh Sharpe
Oh,
kernel version 2.6.23, since I forgot to mention it.
Leigh.
________________________________
Sent: Wednesday, 5 December 2007 3:37 PM
Subject: [LARTC] Adding qdiscs crashes kernel??
Hi all,
I'm having some problems setting up qdiscs on a bridge.The config looks
ifconfig ifb0 up # Bring up the IFB for this bridge.
tc qdisc add dev eth2 ingress
tc qdisc add dev eth3 ingress
tc qdisc add dev ifb0 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
# Raw qdiscs on each bridge port
tc qdisc add dev eth2 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
tc qdisc add dev eth3 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
tc filter add dev eth2 parent 1: protocol 0x8100 prio 5 u32 match u16
3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 #
mark packets for VLAN 3000.
tc filter add dev eth3 parent 1: protocol 0x8100 prio 5 u32 match u16
3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 #
mark packets for VLAN 3000.
tc class add dev eth2 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded isolated # 2000 Kbit rate limit on entry point.
tc class add dev eth3 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded isolated # 2000 Kbit rate limit on entry point.
tc qdisc add dev eth2 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc qdisc add dev eth3 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc class add dev eth2 parent 2:0 classid 2:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 2 allot 1514 cell 8 maxburst 20 avpkt 1000
sharing
tc filter add dev eth2 parent 2:0 protocol 0x8100 prio 2 u32 match u16
3000 0x0fff at 0 flowid 2:1 action ipt -j MARK --or-mark 0x00100000
tc qdisc add dev eth2 parent 2:1 handle 3: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc filter add dev eth2 parent 3:0 protocol 0x8100 prio 4 u32 match u32 0
0 flowid 3:3 # Traffic
class 3 - catchall. Don't MARK further.
(There's lot's more, mostly a repeat of the above with different
criteria.)
When I first boot the box, and apply the traffic shaping before any
traffic flows, all is fine. However, if I apply this same config whilst
the bridge is passing lots of traffic, it completely crashes the box.
Everything freezes, I don't even get a kernel panic message on the
console. Nothing responds and the only way to recover is by a
power-cycle.
If I take the link down on the ethernet port (with ip link set ethx
down), apply the configs, and then bring it back up again, all is OK.
Obviously, though, this isn't really acceptable.
It always crashes immediately after a 'tc qdisc add...' line, but not
always in the same place. Are there any known issues with adding qdiscs
whilst traffic is being queued on it?
I've also tried it using HTB instead of CBQ, and I get the same results.
Anybody got any other ideas as to what might be going on?
Which qdisc add crashes it? Please post the full oops.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Leigh Sharpe
2007-12-05 10:06:16 UTC
Permalink
Not entirely sure it's a bug yet.
Post by Patrick McHardy
Which qdisc add crashes it? Please post the full oops.
I don't get an oops. Just a completely unresponsive system.

It's not terribly consistent. It's always one of these:

tc qdisc add dev eth2 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt 1000 cell 8
tc qdisc add dev eth3 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt 1000 cell 8

But there's no telling which.

Leigh.
________________________________

From: Patrick McHardy [mailto:***@trash.net]
Sent: Wed 5/12/2007 7:07 PM
To: Leigh Sharpe
Cc: ***@mailman.ds9a.nl; Linux Netdev List
Subject: Re: [LARTC] Adding qdiscs crashes kernel??
Post by Patrick McHardy
Oh,
kernel version 2.6.23, since I forgot to mention it.
Leigh.
________________________________
Sent: Wednesday, 5 December 2007 3:37 PM
Subject: [LARTC] Adding qdiscs crashes kernel??
Hi all,
I'm having some problems setting up qdiscs on a bridge.The config looks
ifconfig ifb0 up # Bring up the IFB for this bridge.
tc qdisc add dev eth2 ingress
tc qdisc add dev eth3 ingress
tc qdisc add dev ifb0 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
# Raw qdiscs on each bridge port
tc qdisc add dev eth2 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
tc qdisc add dev eth3 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8
tc filter add dev eth2 parent 1: protocol 0x8100 prio 5 u32 match u16
3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 #
mark packets for VLAN 3000.
tc filter add dev eth3 parent 1: protocol 0x8100 prio 5 u32 match u16
3000 0x0fff at 0 flowid 1:1 action ipt -j MARK --or-mark 0x01000000 #
mark packets for VLAN 3000.
tc class add dev eth2 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded isolated # 2000 Kbit rate limit on entry point.
tc class add dev eth3 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded isolated # 2000 Kbit rate limit on entry point.
tc qdisc add dev eth2 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc qdisc add dev eth3 parent 1:1 handle 2: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc class add dev eth2 parent 2:0 classid 2:1 cbq bandwidth 100Mbit rate
2000Kbit weight 200Kbit prio 2 allot 1514 cell 8 maxburst 20 avpkt 1000
sharing
tc filter add dev eth2 parent 2:0 protocol 0x8100 prio 2 u32 match u16
3000 0x0fff at 0 flowid 2:1 action ipt -j MARK --or-mark 0x00100000
tc qdisc add dev eth2 parent 2:1 handle 3: cbq bandwidth 100Mbit avpkt
1000 cell 8
tc filter add dev eth2 parent 3:0 protocol 0x8100 prio 4 u32 match u32 0
0 flowid 3:3 # Traffic
class 3 - catchall. Don't MARK further.
(There's lot's more, mostly a repeat of the above with different
criteria.)
When I first boot the box, and apply the traffic shaping before any
traffic flows, all is fine. However, if I apply this same config whilst
the bridge is passing lots of traffic, it completely crashes the box.
Everything freezes, I don't even get a kernel panic message on the
console. Nothing responds and the only way to recover is by a
power-cycle.
If I take the link down on the ethernet port (with ip link set ethx
down), apply the configs, and then bring it back up again, all is OK.
Obviously, though, this isn't really acceptable.
It always crashes immediately after a 'tc qdisc add...' line, but not
always in the same place. Are there any known issues with adding qdiscs
whilst traffic is being queued on it?
I've also tried it using HTB instead of CBQ, and I get the same results.
Anybody got any other ideas as to what might be going on?
Which qdisc add crashes it? Please post the full oops.

Loading...