aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-09 02:11:25 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-09 02:11:25 -0400
commit86d804e10a37cd86f16bf72386c37e843a98a74b (patch)
tree04483a937f11c752aea998298a27fc79e6851b2d /net/sched
parent970565bbad0c7b98db0d14131a69e5a0f4445d49 (diff)
netdev: Make netif_schedule() routines work with netdev_queue objects.
Only plain netif_schedule() remains taking a net_device, mostly as a compatability item while we transition the rest of these interfaces. Everything else calls netif_schedule_queue() or __netif_schedule(), both of which take a netdev_queue pointer. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_api.c4
-rw-r--r--net/sched/sch_cbq.c2
-rw-r--r--net/sched/sch_generic.c10
3 files changed, 8 insertions, 8 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index e73bd68aa7ae..95873f8dd37c 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -282,11 +282,11 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer)
282{ 282{
283 struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, 283 struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog,
284 timer); 284 timer);
285 struct net_device *dev = qdisc_dev(wd->qdisc); 285 struct netdev_queue *txq = wd->qdisc->dev_queue;
286 286
287 wd->qdisc->flags &= ~TCQ_F_THROTTLED; 287 wd->qdisc->flags &= ~TCQ_F_THROTTLED;
288 smp_wmb(); 288 smp_wmb();
289 netif_schedule(dev); 289 netif_schedule_queue(txq);
290 290
291 return HRTIMER_NORESTART; 291 return HRTIMER_NORESTART;
292} 292}
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 99ce3da2b0a4..4efc836cbf38 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -650,7 +650,7 @@ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer)
650 } 650 }
651 651
652 sch->flags &= ~TCQ_F_THROTTLED; 652 sch->flags &= ~TCQ_F_THROTTLED;
653 netif_schedule(qdisc_dev(sch)); 653 netif_schedule_queue(sch->dev_queue);
654 return HRTIMER_NORESTART; 654 return HRTIMER_NORESTART;
655} 655}
656 656
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 8247a406a401..407dfdb142a4 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -62,7 +62,7 @@ static inline int qdisc_qlen(struct Qdisc *q)
62 return q->q.qlen; 62 return q->q.qlen;
63} 63}
64 64
65static inline int dev_requeue_skb(struct sk_buff *skb, struct net_device *dev, 65static inline int dev_requeue_skb(struct sk_buff *skb,
66 struct netdev_queue *dev_queue, 66 struct netdev_queue *dev_queue,
67 struct Qdisc *q) 67 struct Qdisc *q)
68{ 68{
@@ -71,7 +71,7 @@ static inline int dev_requeue_skb(struct sk_buff *skb, struct net_device *dev,
71 else 71 else
72 q->ops->requeue(skb, q); 72 q->ops->requeue(skb, q);
73 73
74 netif_schedule(dev); 74 netif_schedule_queue(dev_queue);
75 return 0; 75 return 0;
76} 76}
77 77
@@ -114,7 +114,7 @@ static inline int handle_dev_cpu_collision(struct sk_buff *skb,
114 * some time. 114 * some time.
115 */ 115 */
116 __get_cpu_var(netdev_rx_stat).cpu_collision++; 116 __get_cpu_var(netdev_rx_stat).cpu_collision++;
117 ret = dev_requeue_skb(skb, dev, dev_queue, q); 117 ret = dev_requeue_skb(skb, dev_queue, q);
118 } 118 }
119 119
120 return ret; 120 return ret;
@@ -179,7 +179,7 @@ static inline int qdisc_restart(struct net_device *dev)
179 printk(KERN_WARNING "BUG %s code %d qlen %d\n", 179 printk(KERN_WARNING "BUG %s code %d qlen %d\n",
180 dev->name, ret, q->q.qlen); 180 dev->name, ret, q->q.qlen);
181 181
182 ret = dev_requeue_skb(skb, dev, txq, q); 182 ret = dev_requeue_skb(skb, txq, q);
183 break; 183 break;
184 } 184 }
185 185
@@ -200,7 +200,7 @@ void __qdisc_run(struct net_device *dev)
200 * 2. we've been doing it for too long. 200 * 2. we've been doing it for too long.
201 */ 201 */
202 if (need_resched() || jiffies != start_time) { 202 if (need_resched() || jiffies != start_time) {
203 netif_schedule(dev); 203 netif_schedule_queue(&dev->tx_queue);
204 break; 204 break;
205 } 205 }
206 } 206 }