diff options
author | Patrick McHardy <kaber@trash.net> | 2006-11-29 20:35:18 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:31:41 -0500 |
commit | 9f9afec48221fe4a19f84a9341f5b304bf7d7783 (patch) | |
tree | 26a906902a7af4a835d59d452f567ca641fa1917 /net/sched/sch_hfsc.c | |
parent | 814a175e7b1531a4bcaa63be47bf58cacdcb5010 (diff) |
[NET_SCHED]: Set parent classid in default qdiscs
Set parent classids in default qdiscs to allow walking up the tree
from outside the qdiscs. This is needed by the next patch.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r-- | net/sched/sch_hfsc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 6a6735a2ed35..1142d298ecf6 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -1138,7 +1138,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | |||
1138 | cl->classid = classid; | 1138 | cl->classid = classid; |
1139 | cl->sched = q; | 1139 | cl->sched = q; |
1140 | cl->cl_parent = parent; | 1140 | cl->cl_parent = parent; |
1141 | cl->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); | 1141 | cl->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid); |
1142 | if (cl->qdisc == NULL) | 1142 | if (cl->qdisc == NULL) |
1143 | cl->qdisc = &noop_qdisc; | 1143 | cl->qdisc = &noop_qdisc; |
1144 | cl->stats_lock = &sch->dev->queue_lock; | 1144 | cl->stats_lock = &sch->dev->queue_lock; |
@@ -1271,7 +1271,8 @@ hfsc_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, | |||
1271 | if (cl->level > 0) | 1271 | if (cl->level > 0) |
1272 | return -EINVAL; | 1272 | return -EINVAL; |
1273 | if (new == NULL) { | 1273 | if (new == NULL) { |
1274 | new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); | 1274 | new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, |
1275 | cl->classid); | ||
1275 | if (new == NULL) | 1276 | if (new == NULL) |
1276 | new = &noop_qdisc; | 1277 | new = &noop_qdisc; |
1277 | } | 1278 | } |
@@ -1514,7 +1515,8 @@ hfsc_init_qdisc(struct Qdisc *sch, struct rtattr *opt) | |||
1514 | q->root.refcnt = 1; | 1515 | q->root.refcnt = 1; |
1515 | q->root.classid = sch->handle; | 1516 | q->root.classid = sch->handle; |
1516 | q->root.sched = q; | 1517 | q->root.sched = q; |
1517 | q->root.qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); | 1518 | q->root.qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, |
1519 | sch->handle); | ||
1518 | if (q->root.qdisc == NULL) | 1520 | if (q->root.qdisc == NULL) |
1519 | q->root.qdisc = &noop_qdisc; | 1521 | q->root.qdisc = &noop_qdisc; |
1520 | q->root.stats_lock = &sch->dev->queue_lock; | 1522 | q->root.stats_lock = &sch->dev->queue_lock; |