aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_teql.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-08 20:42:10 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-08 20:42:10 -0400
commitb0e1e6462df3c5944010b3328a546d8fe5d932cd (patch)
tree37e3f86d09d8b37deb06cf1c142baeb8246bbf97 /net/sched/sch_teql.c
parent555353cfa1aee293de445bfa6de43276138ddd82 (diff)
netdev: Move rest of qdisc state into struct netdev_queue
Now qdisc, qdisc_sleeping, and qdisc_list also live there. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_teql.c')
-rw-r--r--net/sched/sch_teql.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index 4f3054e8e1ab..8ac05981be20 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -107,17 +107,19 @@ static struct sk_buff *
107teql_dequeue(struct Qdisc* sch) 107teql_dequeue(struct Qdisc* sch)
108{ 108{
109 struct teql_sched_data *dat = qdisc_priv(sch); 109 struct teql_sched_data *dat = qdisc_priv(sch);
110 struct netdev_queue *dat_queue;
110 struct sk_buff *skb; 111 struct sk_buff *skb;
111 112
112 skb = __skb_dequeue(&dat->q); 113 skb = __skb_dequeue(&dat->q);
114 dat_queue = &dat->m->dev->tx_queue;
113 if (skb == NULL) { 115 if (skb == NULL) {
114 struct net_device *m = qdisc_dev(dat->m->dev->qdisc); 116 struct net_device *m = qdisc_dev(dat_queue->qdisc);
115 if (m) { 117 if (m) {
116 dat->m->slaves = sch; 118 dat->m->slaves = sch;
117 netif_wake_queue(m); 119 netif_wake_queue(m);
118 } 120 }
119 } 121 }
120 sch->q.qlen = dat->q.qlen + dat->m->dev->qdisc->q.qlen; 122 sch->q.qlen = dat->q.qlen + dat_queue->qdisc->q.qlen;
121 return skb; 123 return skb;
122} 124}
123 125
@@ -155,7 +157,7 @@ teql_destroy(struct Qdisc* sch)
155 if (q == master->slaves) { 157 if (q == master->slaves) {
156 master->slaves = NULL; 158 master->slaves = NULL;
157 spin_lock_bh(&master->dev->tx_queue.lock); 159 spin_lock_bh(&master->dev->tx_queue.lock);
158 qdisc_reset(master->dev->qdisc); 160 qdisc_reset(master->dev->tx_queue.qdisc);
159 spin_unlock_bh(&master->dev->tx_queue.lock); 161 spin_unlock_bh(&master->dev->tx_queue.lock);
160 } 162 }
161 } 163 }
@@ -216,7 +218,7 @@ static int teql_qdisc_init(struct Qdisc *sch, struct nlattr *opt)
216static int 218static int
217__teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *dev) 219__teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *dev)
218{ 220{
219 struct teql_sched_data *q = qdisc_priv(dev->qdisc); 221 struct teql_sched_data *q = qdisc_priv(dev->tx_queue.qdisc);
220 struct neighbour *mn = skb->dst->neighbour; 222 struct neighbour *mn = skb->dst->neighbour;
221 struct neighbour *n = q->ncache; 223 struct neighbour *n = q->ncache;
222 224
@@ -252,7 +254,7 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *
252static inline int teql_resolve(struct sk_buff *skb, 254static inline int teql_resolve(struct sk_buff *skb,
253 struct sk_buff *skb_res, struct net_device *dev) 255 struct sk_buff *skb_res, struct net_device *dev)
254{ 256{
255 if (dev->qdisc == &noop_qdisc) 257 if (dev->tx_queue.qdisc == &noop_qdisc)
256 return -ENODEV; 258 return -ENODEV;
257 259
258 if (dev->header_ops == NULL || 260 if (dev->header_ops == NULL ||
@@ -284,7 +286,7 @@ restart:
284 do { 286 do {
285 struct net_device *slave = qdisc_dev(q); 287 struct net_device *slave = qdisc_dev(q);
286 288
287 if (slave->qdisc_sleeping != q) 289 if (slave->tx_queue.qdisc_sleeping != q)
288 continue; 290 continue;
289 if (netif_queue_stopped(slave) || 291 if (netif_queue_stopped(slave) ||
290 __netif_subqueue_stopped(slave, subq) || 292 __netif_subqueue_stopped(slave, subq) ||