Skip to content

Commit 8d55373

Browse files
koct9idavem330
authored andcommitted
net/sched/hfsc: allocate tcf block for hfsc root class
Without this filters cannot be attached. Signed-off-by: Konstantin Khlebnikov <[email protected]> Fixes: 6529eab ("net: sched: introduce tcf block infractructure") Acked-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ad729bc commit 8d55373

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

net/sched/sch_hfsc.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
14281428
return err;
14291429
q->eligible = RB_ROOT;
14301430

1431+
err = tcf_block_get(&q->root.block, &q->root.filter_list);
1432+
if (err)
1433+
goto err_tcf;
1434+
14311435
q->root.cl_common.classid = sch->handle;
14321436
q->root.refcnt = 1;
14331437
q->root.sched = q;
@@ -1447,6 +1451,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
14471451
qdisc_watchdog_init(&q->watchdog, sch);
14481452

14491453
return 0;
1454+
1455+
err_tcf:
1456+
qdisc_class_hash_destroy(&q->clhash);
1457+
return err;
14501458
}
14511459

14521460
static int

0 commit comments

Comments
 (0)