[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>
This commit is contained in:
committed by
David S. Miller
parent
814a175e7b
commit
9f9afec482
@@ -1223,8 +1223,9 @@ static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
|
||||
struct htb_class *cl = (struct htb_class *)arg;
|
||||
|
||||
if (cl && !cl->level) {
|
||||
if (new == NULL && (new = qdisc_create_dflt(sch->dev,
|
||||
&pfifo_qdisc_ops))
|
||||
if (new == NULL &&
|
||||
(new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops,
|
||||
cl->classid))
|
||||
== NULL)
|
||||
return -ENOBUFS;
|
||||
sch_tree_lock(sch);
|
||||
@@ -1415,7 +1416,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
|
||||
/* create leaf qdisc early because it uses kmalloc(GFP_KERNEL)
|
||||
so that can't be used inside of sch_tree_lock
|
||||
-- thanks to Karlis Peisenieks */
|
||||
new_q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops);
|
||||
new_q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid);
|
||||
sch_tree_lock(sch);
|
||||
if (parent && !parent->level) {
|
||||
/* turn parent into inner node */
|
||||
|
Reference in New Issue
Block a user