diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-08 20:06:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-08 20:06:30 -0400 |
commit | 5ce2d488fe039ddd86a638496cf704df86c74eeb (patch) | |
tree | 71b4d982bfa8bd457bb41c0693c0e70d75b524b4 /net/sched/sch_netem.c | |
parent | bb949fbd1878973c3539d9aecff52f284482a937 (diff) |
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_netem.c')
-rw-r--r-- | net/sched/sch_netem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index aa7a04e32ae9..790582960444 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -180,7 +180,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
180 | * skb will be queued. | 180 | * skb will be queued. |
181 | */ | 181 | */ |
182 | if (count > 1 && (skb2 = skb_clone(skb, GFP_ATOMIC)) != NULL) { | 182 | if (count > 1 && (skb2 = skb_clone(skb, GFP_ATOMIC)) != NULL) { |
183 | struct Qdisc *rootq = sch->dev->qdisc; | 183 | struct Qdisc *rootq = qdisc_dev(sch)->qdisc; |
184 | u32 dupsave = q->duplicate; /* prevent duplicating a dup... */ | 184 | u32 dupsave = q->duplicate; /* prevent duplicating a dup... */ |
185 | q->duplicate = 0; | 185 | q->duplicate = 0; |
186 | 186 | ||
@@ -333,9 +333,9 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr) | |||
333 | for (i = 0; i < n; i++) | 333 | for (i = 0; i < n; i++) |
334 | d->table[i] = data[i]; | 334 | d->table[i] = data[i]; |
335 | 335 | ||
336 | spin_lock_bh(&sch->dev->queue_lock); | 336 | spin_lock_bh(&qdisc_dev(sch)->queue_lock); |
337 | d = xchg(&q->delay_dist, d); | 337 | d = xchg(&q->delay_dist, d); |
338 | spin_unlock_bh(&sch->dev->queue_lock); | 338 | spin_unlock_bh(&qdisc_dev(sch)->queue_lock); |
339 | 339 | ||
340 | kfree(d); | 340 | kfree(d); |
341 | return 0; | 341 | return 0; |
@@ -495,7 +495,7 @@ static int tfifo_init(struct Qdisc *sch, struct nlattr *opt) | |||
495 | 495 | ||
496 | q->limit = ctl->limit; | 496 | q->limit = ctl->limit; |
497 | } else | 497 | } else |
498 | q->limit = max_t(u32, sch->dev->tx_queue_len, 1); | 498 | q->limit = max_t(u32, qdisc_dev(sch)->tx_queue_len, 1); |
499 | 499 | ||
500 | q->oldest = PSCHED_PASTPERFECT; | 500 | q->oldest = PSCHED_PASTPERFECT; |
501 | return 0; | 501 | return 0; |
@@ -536,7 +536,7 @@ static int netem_init(struct Qdisc *sch, struct nlattr *opt) | |||
536 | 536 | ||
537 | qdisc_watchdog_init(&q->watchdog, sch); | 537 | qdisc_watchdog_init(&q->watchdog, sch); |
538 | 538 | ||
539 | q->qdisc = qdisc_create_dflt(sch->dev, sch->dev_queue, | 539 | q->qdisc = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, |
540 | &tfifo_qdisc_ops, | 540 | &tfifo_qdisc_ops, |
541 | TC_H_MAKE(sch->handle, 1)); | 541 | TC_H_MAKE(sch->handle, 1)); |
542 | if (!q->qdisc) { | 542 | if (!q->qdisc) { |