Commit 9daaadbe authored by Jason Wang's avatar Jason Wang Committed by Greg Kroah-Hartman

tuntap: restore default qdisc

[ Upstream commit 016adb72 ]

After commit f84bb1ea ("net: fix IFF_NO_QUEUE for drivers using
alloc_netdev"), default qdisc was changed to noqueue because
tuntap does not set tx_queue_len during .setup(). This patch restores
default qdisc by setting tx_queue_len in tun_setup().

Fixes: f84bb1ea ("net: fix IFF_NO_QUEUE for drivers using alloc_netdev")
Cc: Phil Sutter <phil@nwl.cc>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarPhil Sutter <phil@nwl.cc>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e137eeb3
...@@ -1001,7 +1001,6 @@ static void tun_net_init(struct net_device *dev) ...@@ -1001,7 +1001,6 @@ static void tun_net_init(struct net_device *dev)
/* Zero header length */ /* Zero header length */
dev->type = ARPHRD_NONE; dev->type = ARPHRD_NONE;
dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST; dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
dev->tx_queue_len = TUN_READQ_SIZE; /* We prefer our own queue length */
break; break;
case IFF_TAP: case IFF_TAP:
...@@ -1013,7 +1012,6 @@ static void tun_net_init(struct net_device *dev) ...@@ -1013,7 +1012,6 @@ static void tun_net_init(struct net_device *dev)
eth_hw_addr_random(dev); eth_hw_addr_random(dev);
dev->tx_queue_len = TUN_READQ_SIZE; /* We prefer our own queue length */
break; break;
} }
} }
...@@ -1464,6 +1462,8 @@ static void tun_setup(struct net_device *dev) ...@@ -1464,6 +1462,8 @@ static void tun_setup(struct net_device *dev)
dev->ethtool_ops = &tun_ethtool_ops; dev->ethtool_ops = &tun_ethtool_ops;
dev->destructor = tun_free_netdev; dev->destructor = tun_free_netdev;
/* We prefer our own queue length */
dev->tx_queue_len = TUN_READQ_SIZE;
} }
/* Trivial set of netlink ops to allow deleting tun or tap /* Trivial set of netlink ops to allow deleting tun or tap
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment