aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_cbq.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r--net/sched/sch_cbq.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index bac881bfe362..ba82dfab6043 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
@@ -1685,7 +1687,7 @@ static int cbq_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
1685 sch_tree_lock(sch); 1687 sch_tree_lock(sch);
1686 *old = cl->q; 1688 *old = cl->q;
1687 cl->q = new; 1689 cl->q = new;
1688 sch->q.qlen -= (*old)->q.qlen; 1690 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen);
1689 qdisc_reset(*old); 1691 qdisc_reset(*old);
1690 sch_tree_unlock(sch); 1692 sch_tree_unlock(sch);
1691 1693
@@ -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;