Commit 4b469955 authored by Phil Sutter's avatar Phil Sutter Committed by David S. Miller

net: sch_generic: react upon IFF_NO_QUEUE flag

Handle IFF_NO_QUEUE as alternative to tx_queue_len being zero.
Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
Acked-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fa8187c9
...@@ -735,7 +735,7 @@ static void attach_one_default_qdisc(struct net_device *dev, ...@@ -735,7 +735,7 @@ static void attach_one_default_qdisc(struct net_device *dev,
{ {
struct Qdisc *qdisc = &noqueue_qdisc; struct Qdisc *qdisc = &noqueue_qdisc;
if (dev->tx_queue_len) { if (dev->tx_queue_len && !(dev->priv_flags & IFF_NO_QUEUE)) {
qdisc = qdisc_create_dflt(dev_queue, qdisc = qdisc_create_dflt(dev_queue,
default_qdisc_ops, TC_H_ROOT); default_qdisc_ops, TC_H_ROOT);
if (!qdisc) { if (!qdisc) {
...@@ -755,7 +755,9 @@ static void attach_default_qdiscs(struct net_device *dev) ...@@ -755,7 +755,9 @@ static void attach_default_qdiscs(struct net_device *dev)
txq = netdev_get_tx_queue(dev, 0); txq = netdev_get_tx_queue(dev, 0);
if (!netif_is_multiqueue(dev) || dev->tx_queue_len == 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); netdev_for_each_tx_queue(dev, attach_one_default_qdisc, NULL);
dev->qdisc = txq->qdisc_sleeping; dev->qdisc = txq->qdisc_sleeping;
atomic_inc(&dev->qdisc->refcnt); atomic_inc(&dev->qdisc->refcnt);
......
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