diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2017-08-10 11:31:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-11 23:30:30 +0200 |
commit | 8d55373875052b891ae72c9bcaf9c2d7178676c0 (patch) | |
tree | 1790666f884fa0ef7c180977ef6b3137df188d43 /net/sched/sch_hfsc.c | |
parent | bonding: require speed/duplex only for 802.3ad, alb and tlb (diff) | |
download | linux-8d55373875052b891ae72c9bcaf9c2d7178676c0.tar.xz linux-8d55373875052b891ae72c9bcaf9c2d7178676c0.zip |
net/sched/hfsc: allocate tcf block for hfsc root class
Without this filters cannot be attached.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure")
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r-- | net/sched/sch_hfsc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index b52f74610dc7..3ad02bbe6903 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -1428,6 +1428,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt) return err; 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.refcnt = 1; q->root.sched = q; @@ -1447,6 +1451,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt) qdisc_watchdog_init(&q->watchdog, sch); return 0; + +err_tcf: + qdisc_class_hash_destroy(&q->clhash); + return err; } static int |