提交 8d553738 编写于 作者: K Konstantin Khlebnikov 提交者: David S. Miller

net/sched/hfsc: allocate tcf block for hfsc root class

Without this filters cannot be attached.
Signed-off-by: NKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 6529eaba ("net: sched: introduce tcf block infractructure")
Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ad729bc9
...@@ -1428,6 +1428,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt) ...@@ -1428,6 +1428,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
return err; return err;
q->eligible = RB_ROOT; q->eligible = RB_ROOT;
err = tcf_block_get(&q->root.block, &q->root.filter_list);
if (err)
goto err_tcf;
q->root.cl_common.classid = sch->handle; q->root.cl_common.classid = sch->handle;
q->root.refcnt = 1; q->root.refcnt = 1;
q->root.sched = q; q->root.sched = q;
...@@ -1447,6 +1451,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt) ...@@ -1447,6 +1451,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
qdisc_watchdog_init(&q->watchdog, sch); qdisc_watchdog_init(&q->watchdog, sch);
return 0; return 0;
err_tcf:
qdisc_class_hash_destroy(&q->clhash);
return err;
} }
static int static int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册