[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 07 Aug 2008 18:50:24 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: stephen.hemminger@...tta.com
Cc: netdev@...r.kernel.org, linux-kernel@....kernel.org
Subject: Re: qdisc and down links (regression)
From: David Miller <davem@...emloft.net>
Date: Thu, 07 Aug 2008 15:47:35 -0700 (PDT)
> From: Stephen Hemminger <stephen.hemminger@...tta.com>
> Date: Thu, 7 Aug 2008 14:30:36 -0700
>
> > Before the mulitqueue changes in 2.6.27-rc it was possible to setup
> > queueing disciplines before the link came up (carrier active). This
> > no longer works. If link is down, the qdisc is the noop_qdisc and
> > any configuration changes don't seem to be shown.
>
> I'll see why this happens, it wasn't an intentional change.
This should fix it, let me know if it doesn't:
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 83b23b5..ba1d121 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -189,7 +189,7 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle)
for (i = 0; i < dev->num_tx_queues; i++) {
struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
- struct Qdisc *q, *txq_root = txq->qdisc;
+ struct Qdisc *q, *txq_root = txq->qdisc_sleeping;
if (!(txq_root->flags & TCQ_F_BUILTIN) &&
txq_root->handle == handle)
@@ -793,7 +793,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
}
}
if ((parent != TC_H_ROOT) && !(sch->flags & TCQ_F_INGRESS))
- list_add_tail(&sch->list, &dev_queue->qdisc->list);
+ list_add_tail(&sch->list, &dev_queue->qdisc_sleeping->list);
return sch;
}
@@ -1236,11 +1236,11 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb)
q_idx = 0;
dev_queue = netdev_get_tx_queue(dev, 0);
- if (tc_dump_qdisc_root(dev_queue->qdisc, skb, cb, &q_idx, s_q_idx) < 0)
+ if (tc_dump_qdisc_root(dev_queue->qdisc_sleeping, skb, cb, &q_idx, s_q_idx) < 0)
goto done;
dev_queue = &dev->rx_queue;
- if (tc_dump_qdisc_root(dev_queue->qdisc, skb, cb, &q_idx, s_q_idx) < 0)
+ if (tc_dump_qdisc_root(dev_queue->qdisc_sleeping, skb, cb, &q_idx, s_q_idx) < 0)
goto done;
cont:
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists