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_api.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_api.c')
-rw-r--r-- | net/sched/sch_api.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index b86c98bd06a3..1f893082a4f6 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -281,7 +281,7 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) | |||
281 | { | 281 | { |
282 | struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, | 282 | struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, |
283 | timer); | 283 | timer); |
284 | struct net_device *dev = wd->qdisc->dev; | 284 | struct net_device *dev = qdisc_dev(wd->qdisc); |
285 | 285 | ||
286 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; | 286 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; |
287 | smp_wmb(); | 287 | smp_wmb(); |
@@ -493,7 +493,7 @@ void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n) | |||
493 | if (TC_H_MAJ(parentid) == TC_H_MAJ(TC_H_INGRESS)) | 493 | if (TC_H_MAJ(parentid) == TC_H_MAJ(TC_H_INGRESS)) |
494 | return; | 494 | return; |
495 | 495 | ||
496 | sch = qdisc_lookup(sch->dev, TC_H_MAJ(parentid)); | 496 | sch = qdisc_lookup(qdisc_dev(sch), TC_H_MAJ(parentid)); |
497 | if (sch == NULL) { | 497 | if (sch == NULL) { |
498 | WARN_ON(parentid != TC_H_ROOT); | 498 | WARN_ON(parentid != TC_H_ROOT); |
499 | return; | 499 | return; |
@@ -593,7 +593,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue, | |||
593 | if (ops == NULL) | 593 | if (ops == NULL) |
594 | goto err_out; | 594 | goto err_out; |
595 | 595 | ||
596 | sch = qdisc_alloc(dev, dev_queue, ops); | 596 | sch = qdisc_alloc(dev_queue, ops); |
597 | if (IS_ERR(sch)) { | 597 | if (IS_ERR(sch)) { |
598 | err = PTR_ERR(sch); | 598 | err = PTR_ERR(sch); |
599 | goto err_out2; | 599 | goto err_out2; |
@@ -940,7 +940,7 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, | |||
940 | tcm->tcm_family = AF_UNSPEC; | 940 | tcm->tcm_family = AF_UNSPEC; |
941 | tcm->tcm__pad1 = 0; | 941 | tcm->tcm__pad1 = 0; |
942 | tcm->tcm__pad2 = 0; | 942 | tcm->tcm__pad2 = 0; |
943 | tcm->tcm_ifindex = q->dev->ifindex; | 943 | tcm->tcm_ifindex = qdisc_dev(q)->ifindex; |
944 | tcm->tcm_parent = clid; | 944 | tcm->tcm_parent = clid; |
945 | tcm->tcm_handle = q->handle; | 945 | tcm->tcm_handle = q->handle; |
946 | tcm->tcm_info = atomic_read(&q->refcnt); | 946 | tcm->tcm_info = atomic_read(&q->refcnt); |
@@ -1186,7 +1186,7 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, | |||
1186 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); | 1186 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); |
1187 | tcm = NLMSG_DATA(nlh); | 1187 | tcm = NLMSG_DATA(nlh); |
1188 | tcm->tcm_family = AF_UNSPEC; | 1188 | tcm->tcm_family = AF_UNSPEC; |
1189 | tcm->tcm_ifindex = q->dev->ifindex; | 1189 | tcm->tcm_ifindex = qdisc_dev(q)->ifindex; |
1190 | tcm->tcm_parent = q->handle; | 1190 | tcm->tcm_parent = q->handle; |
1191 | tcm->tcm_handle = q->handle; | 1191 | tcm->tcm_handle = q->handle; |
1192 | tcm->tcm_info = 0; | 1192 | tcm->tcm_info = 0; |