[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
@@ -1429,7 +1429,8 @@ static int cbq_init(struct Qdisc *sch, struct rtattr *opt)
|
||||
q->link.sibling = &q->link;
|
||||
q->link.classid = sch->handle;
|
||||
q->link.qdisc = sch;
|
||||
if (!(q->link.q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops)))
|
||||
if (!(q->link.q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops,
|
||||
sch->handle)))
|
||||
q->link.q = &noop_qdisc;
|
||||
|
||||
q->link.priority = TC_CBQ_MAXPRIO-1;
|
||||
@@ -1674,7 +1675,8 @@ static int cbq_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
|
||||
|
||||
if (cl) {
|
||||
if (new == NULL) {
|
||||
if ((new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops)) == NULL)
|
||||
if ((new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops,
|
||||
cl->classid)) == NULL)
|
||||
return -ENOBUFS;
|
||||
} else {
|
||||
#ifdef CONFIG_NET_CLS_POLICE
|
||||
@@ -1932,7 +1934,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t
|
||||
cl->R_tab = rtab;
|
||||
rtab = NULL;
|
||||
cl->refcnt = 1;
|
||||
if (!(cl->q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops)))
|
||||
if (!(cl->q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid)))
|
||||
cl->q = &noop_qdisc;
|
||||
cl->classid = classid;
|
||||
cl->tparent = parent;
|
||||
|
||||
Reference in New Issue
Block a user