summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_generic.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2015-08-27 21:21:37 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-27 17:14:29 -0700
commitdb4094bca7a5746bc8e36db0557e8732963e88f0 (patch)
tree439fac3c1a73a85d812acfdee43217be662623ee /net/sched/sch_generic.c
parentf84bb1eac0275283ccd76455e20f926e186ea8c8 (diff)
downloadlinux-stable-db4094bca7a5746bc8e36db0557e8732963e88f0.tar.gz
linux-stable-db4094bca7a5746bc8e36db0557e8732963e88f0.tar.bz2
linux-stable-db4094bca7a5746bc8e36db0557e8732963e88f0.zip
net: sched: ignore tx_queue_len when assigning default qdisc
Since alloc_netdev_mqs() sets IFF_NO_QUEUE for drivers not initializing tx_queue_len, it is safe to assume that if tx_queue_len is zero, dev->priv flags always contains IFF_NO_QUEUE. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r--net/sched/sch_generic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 942fea8405a4..f501b7409320 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -735,7 +735,7 @@ static void attach_one_default_qdisc(struct net_device *dev,
{
struct Qdisc *qdisc = &noqueue_qdisc;
- if (dev->tx_queue_len && !(dev->priv_flags & IFF_NO_QUEUE)) {
+ if (!(dev->priv_flags & IFF_NO_QUEUE)) {
qdisc = qdisc_create_dflt(dev_queue,
default_qdisc_ops, TC_H_ROOT);
if (!qdisc) {
@@ -756,7 +756,6 @@ static void attach_default_qdiscs(struct net_device *dev)
txq = netdev_get_tx_queue(dev, 0);
if (!netif_is_multiqueue(dev) ||
- dev->tx_queue_len == 0 ||
dev->priv_flags & IFF_NO_QUEUE) {
netdev_for_each_tx_queue(dev, attach_one_default_qdisc, NULL);
dev->qdisc = txq->qdisc_sleeping;