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_htb.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_htb.c')
-rw-r--r-- | net/sched/sch_htb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 08fa4d083615..3b36e9d60c20 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -1223,8 +1223,9 @@ static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, | |||
1223 | struct htb_class *cl = (struct htb_class *)arg; | 1223 | struct htb_class *cl = (struct htb_class *)arg; |
1224 | 1224 | ||
1225 | if (cl && !cl->level) { | 1225 | if (cl && !cl->level) { |
1226 | if (new == NULL && (new = qdisc_create_dflt(sch->dev, | 1226 | if (new == NULL && |
1227 | &pfifo_qdisc_ops)) | 1227 | (new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, |
1228 | cl->classid)) | ||
1228 | == NULL) | 1229 | == NULL) |
1229 | return -ENOBUFS; | 1230 | return -ENOBUFS; |
1230 | sch_tree_lock(sch); | 1231 | sch_tree_lock(sch); |
@@ -1415,7 +1416,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, | |||
1415 | /* create leaf qdisc early because it uses kmalloc(GFP_KERNEL) | 1416 | /* create leaf qdisc early because it uses kmalloc(GFP_KERNEL) |
1416 | so that can't be used inside of sch_tree_lock | 1417 | so that can't be used inside of sch_tree_lock |
1417 | -- thanks to Karlis Peisenieks */ | 1418 | -- thanks to Karlis Peisenieks */ |
1418 | new_q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); | 1419 | new_q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid); |
1419 | sch_tree_lock(sch); | 1420 | sch_tree_lock(sch); |
1420 | if (parent && !parent->level) { | 1421 | if (parent && !parent->level) { |
1421 | /* turn parent into inner node */ | 1422 | /* turn parent into inner node */ |