Subject: Re: [PATCH] netdev: handle setting transmit queue length on active device.

From: Patrick McHardy <[email-masked]>
Date: Wed, 18 Mar 2009 19:31:39 +0100

Stephen Hemminger wrote:
> On Wed, 18 Mar 2009 19:08:07 +0100
> Patrick McHardy <[email-masked]> wrote:
> 
>> I'd suggest to simply attach a pfifo qdisc with an explicitly
>> configured limit to activate queueing on virtual devices.
> 
> The existing code is broken if user does:
> 
> # ip li set dev eth0.200 txq 200
> # tc qdisc set dev eth0.200 root sfq
> # tc qdisc del dev eth0.200 root
> # ip li set dev eth0.200 txq 0
> 
> The vlan is now dead because it is impossible to go back
> to the no queueing (noop) qdisc.  Also, when doing performance tests
> it is useful to be able to turn off transmit queue entirely.

What I meant is:

# ip l l dummy0
109: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state 
UNKNOWN
     link/ether 0a:94:90:3c:e3:45 brd ff:ff:ff:ff:ff:ff

# tc qdisc add dev dummy0 root pfifo limit 1000
# ip l l dummy0
109: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo state 
UNKNOWN
     link/ether 0a:94:90:3c:e3:45 brd ff:ff:ff:ff:ff:ff

# tc qdisc del dev dummy0 root
# ip l l dummy0
109: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state 
UNKNOWN
     link/ether 0a:94:90:3c:e3:45 brd ff:ff:ff:ff:ff:ff

It should work your way as well if you set the transmit queue length
to zero before removing the root qdisc.