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_cbq.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_cbq.c')
-rw-r--r-- | net/sched/sch_cbq.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index bac881bfe362..908b10d0d61f 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -1429,7 +1429,8 @@ static int cbq_init(struct Qdisc *sch, struct rtattr *opt) | |||
1429 | q->link.sibling = &q->link; | 1429 | q->link.sibling = &q->link; |
1430 | q->link.classid = sch->handle; | 1430 | q->link.classid = sch->handle; |
1431 | q->link.qdisc = sch; | 1431 | q->link.qdisc = sch; |
1432 | if (!(q->link.q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops))) | 1432 | if (!(q->link.q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, |
1433 | sch->handle))) | ||
1433 | q->link.q = &noop_qdisc; | 1434 | q->link.q = &noop_qdisc; |
1434 | 1435 | ||
1435 | q->link.priority = TC_CBQ_MAXPRIO-1; | 1436 | q->link.priority = TC_CBQ_MAXPRIO-1; |
@@ -1674,7 +1675,8 @@ static int cbq_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, | |||
1674 | 1675 | ||
1675 | if (cl) { | 1676 | if (cl) { |
1676 | if (new == NULL) { | 1677 | if (new == NULL) { |
1677 | if ((new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops)) == NULL) | 1678 | if ((new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, |
1679 | cl->classid)) == NULL) | ||
1678 | return -ENOBUFS; | 1680 | return -ENOBUFS; |
1679 | } else { | 1681 | } else { |
1680 | #ifdef CONFIG_NET_CLS_POLICE | 1682 | #ifdef CONFIG_NET_CLS_POLICE |
@@ -1932,7 +1934,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t | |||
1932 | cl->R_tab = rtab; | 1934 | cl->R_tab = rtab; |
1933 | rtab = NULL; | 1935 | rtab = NULL; |
1934 | cl->refcnt = 1; | 1936 | cl->refcnt = 1; |
1935 | if (!(cl->q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops))) | 1937 | if (!(cl->q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid))) |
1936 | cl->q = &noop_qdisc; | 1938 | cl->q = &noop_qdisc; |
1937 | cl->classid = classid; | 1939 | cl->classid = classid; |
1938 | cl->tparent = parent; | 1940 | cl->tparent = parent; |