Lines Matching full:head
31 struct cls_mall_head *head = rcu_dereference_bh(tp->root); in mall_classify() local
33 if (tc_skip_sw(head->flags)) in mall_classify()
36 *res = head->res; in mall_classify()
37 return tcf_exts_exec(skb, &head->exts, res); in mall_classify()
45 static void __mall_destroy(struct cls_mall_head *head) in __mall_destroy() argument
47 tcf_exts_destroy(&head->exts); in __mall_destroy()
48 tcf_exts_put_net(&head->exts); in __mall_destroy()
49 kfree(head); in __mall_destroy()
54 struct cls_mall_head *head = container_of(to_rcu_work(work), in mall_destroy_work() local
58 __mall_destroy(head); in mall_destroy_work()
63 struct cls_mall_head *head, in mall_destroy_hw_filter() argument
70 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack); in mall_destroy_hw_filter()
75 tcf_block_offload_dec(block, &head->flags); in mall_destroy_hw_filter()
79 struct cls_mall_head *head, in mall_replace_hw_filter() argument
85 bool skip_sw = tc_skip_sw(head->flags); in mall_replace_hw_filter()
88 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack); in mall_replace_hw_filter()
90 cls_mall.exts = &head->exts; in mall_replace_hw_filter()
96 mall_destroy_hw_filter(tp, head, cookie, NULL); in mall_replace_hw_filter()
99 head->in_hw_count = err; in mall_replace_hw_filter()
100 tcf_block_offload_inc(block, &head->flags); in mall_replace_hw_filter()
103 if (skip_sw && !(head->flags & TCA_CLS_FLAGS_IN_HW)) in mall_replace_hw_filter()
111 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_destroy() local
113 if (!head) in mall_destroy()
116 tcf_unbind_filter(tp, &head->res); in mall_destroy()
118 if (!tc_skip_hw(head->flags)) in mall_destroy()
119 mall_destroy_hw_filter(tp, head, (unsigned long) head, extack); in mall_destroy()
121 if (tcf_exts_get_net(&head->exts)) in mall_destroy()
122 tcf_queue_work(&head->rwork, mall_destroy_work); in mall_destroy()
124 __mall_destroy(head); in mall_destroy()
129 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_get() local
131 if (head && head->handle == handle) in mall_get()
132 return head; in mall_get()
144 struct cls_mall_head *head, in mall_set_parms() argument
151 err = tcf_exts_validate(net, tp, tb, est, &head->exts, ovr, extack); in mall_set_parms()
156 head->res.classid = nla_get_u32(tb[TCA_MATCHALL_CLASSID]); in mall_set_parms()
157 tcf_bind_filter(tp, &head->res, base); in mall_set_parms()
167 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_change() local
176 if (head) in mall_change()
218 *arg = head; in mall_change()
238 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_walk() local
242 if (arg->fn(tp, head, arg) < 0) in mall_walk()
251 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_reoffload() local
256 if (tc_skip_hw(head->flags)) in mall_reoffload()
259 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack); in mall_reoffload()
262 cls_mall.exts = &head->exts; in mall_reoffload()
263 cls_mall.cookie = (unsigned long)head; in mall_reoffload()
267 if (add && tc_skip_sw(head->flags)) in mall_reoffload()
272 tc_cls_offload_cnt_update(block, &head->in_hw_count, &head->flags, add); in mall_reoffload()
280 struct cls_mall_head *head = fh; in mall_dump() local
283 if (!head) in mall_dump()
286 t->tcm_handle = head->handle; in mall_dump()
292 if (head->res.classid && in mall_dump()
293 nla_put_u32(skb, TCA_MATCHALL_CLASSID, head->res.classid)) in mall_dump()
296 if (head->flags && nla_put_u32(skb, TCA_MATCHALL_FLAGS, head->flags)) in mall_dump()
299 if (tcf_exts_dump(skb, &head->exts)) in mall_dump()
304 if (tcf_exts_dump_stats(skb, &head->exts) < 0) in mall_dump()
317 struct cls_mall_head *head = fh; in mall_bind_class() local
319 if (head && head->res.classid == classid) { in mall_bind_class()
321 __tcf_bind_filter(q, &head->res, base); in mall_bind_class()
323 __tcf_unbind_filter(q, &head->res); in mall_bind_class()