summaryrefslogtreecommitdiff
path: root/net/sched/sch_prio.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-08 17:06:30 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-08 17:06:30 -0700
commit5ce2d488fe039ddd86a638496cf704df86c74eeb (patch)
tree71b4d982bfa8bd457bb41c0693c0e70d75b524b4 /net/sched/sch_prio.c
parentbb949fbd1878973c3539d9aecff52f284482a937 (diff)
downloadlinux-stable-5ce2d488fe039ddd86a638496cf704df86c74eeb.tar.gz
linux-stable-5ce2d488fe039ddd86a638496cf704df86c74eeb.tar.bz2
linux-stable-5ce2d488fe039ddd86a638496cf704df86c74eeb.zip
pkt_sched: Remove 'dev' member of struct Qdisc.
It can be obtained via the netdev_queue. So create a helper routine, qdisc_dev(), to make the transformations nicer looking. Now, qdisc_alloc() now no longer needs a net_device pointer argument. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_prio.c')
-rw-r--r--net/sched/sch_prio.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index ca58a039208e..39157f7bc046 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -136,7 +136,8 @@ prio_dequeue(struct Qdisc* sch)
* pulling an skb. This way we avoid excessive requeues
* for slower queues.
*/
- if (!__netif_subqueue_stopped(sch->dev, (q->mq ? prio : 0))) {
+ if (!__netif_subqueue_stopped(qdisc_dev(sch),
+ (q->mq ? prio : 0))) {
qdisc = q->queues[prio];
skb = qdisc->dequeue(qdisc);
if (skb) {
@@ -165,8 +166,8 @@ static struct sk_buff *rr_dequeue(struct Qdisc* sch)
* for slower queues. If the queue is stopped, try the
* next queue.
*/
- if (!__netif_subqueue_stopped(sch->dev,
- (q->mq ? q->curband : 0))) {
+ if (!__netif_subqueue_stopped(qdisc_dev(sch),
+ (q->mq ? q->curband : 0))) {
qdisc = q->queues[q->curband];
skb = qdisc->dequeue(qdisc);
if (skb) {
@@ -249,10 +250,10 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt)
if (q->mq) {
if (sch->parent != TC_H_ROOT)
return -EINVAL;
- if (netif_is_multiqueue(sch->dev)) {
+ if (netif_is_multiqueue(qdisc_dev(sch))) {
if (q->bands == 0)
- q->bands = sch->dev->egress_subqueue_count;
- else if (q->bands != sch->dev->egress_subqueue_count)
+ q->bands = qdisc_dev(sch)->egress_subqueue_count;
+ else if (q->bands != qdisc_dev(sch)->egress_subqueue_count)
return -EINVAL;
} else
return -EOPNOTSUPP;
@@ -281,7 +282,7 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt)
for (i=0; i<q->bands; i++) {
if (q->queues[i] == &noop_qdisc) {
struct Qdisc *child;
- child = qdisc_create_dflt(sch->dev, sch->dev_queue,
+ child = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
&pfifo_qdisc_ops,
TC_H_MAKE(sch->handle, i + 1));
if (child) {