Lines Matching refs:head

32 	struct cls_mall_head *head = rcu_dereference_bh(tp->root);  in mall_classify()  local
34 if (unlikely(!head)) in mall_classify()
37 if (tc_skip_sw(head->flags)) in mall_classify()
40 *res = head->res; in mall_classify()
41 __this_cpu_inc(head->pf->rhit); in mall_classify()
42 return tcf_exts_exec(skb, &head->exts, res); in mall_classify()
50 static void __mall_destroy(struct cls_mall_head *head) in __mall_destroy() argument
52 tcf_exts_destroy(&head->exts); in __mall_destroy()
53 tcf_exts_put_net(&head->exts); in __mall_destroy()
54 free_percpu(head->pf); in __mall_destroy()
55 kfree(head); in __mall_destroy()
60 struct cls_mall_head *head = container_of(to_rcu_work(work), in mall_destroy_work() local
64 __mall_destroy(head); in mall_destroy_work()
69 struct cls_mall_head *head, in mall_destroy_hw_filter() argument
76 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack); in mall_destroy_hw_filter()
81 &head->flags, &head->in_hw_count, true); in mall_destroy_hw_filter()
85 struct cls_mall_head *head, in mall_replace_hw_filter() argument
91 bool skip_sw = tc_skip_sw(head->flags); in mall_replace_hw_filter()
94 cls_mall.rule = flow_rule_alloc(tcf_exts_num_actions(&head->exts)); in mall_replace_hw_filter()
98 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack); in mall_replace_hw_filter()
102 err = tc_setup_offload_action(&cls_mall.rule->action, &head->exts, in mall_replace_hw_filter()
106 mall_destroy_hw_filter(tp, head, cookie, NULL); in mall_replace_hw_filter()
112 skip_sw, &head->flags, &head->in_hw_count, true); in mall_replace_hw_filter()
117 mall_destroy_hw_filter(tp, head, cookie, NULL); in mall_replace_hw_filter()
121 if (skip_sw && !(head->flags & TCA_CLS_FLAGS_IN_HW)) in mall_replace_hw_filter()
130 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_destroy() local
132 if (!head) in mall_destroy()
135 tcf_unbind_filter(tp, &head->res); in mall_destroy()
137 if (!tc_skip_hw(head->flags)) in mall_destroy()
138 mall_destroy_hw_filter(tp, head, (unsigned long) head, extack); in mall_destroy()
140 if (tcf_exts_get_net(&head->exts)) in mall_destroy()
141 tcf_queue_work(&head->rwork, mall_destroy_work); in mall_destroy()
143 __mall_destroy(head); in mall_destroy()
148 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_get() local
150 if (head && head->handle == handle) in mall_get()
151 return head; in mall_get()
168 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_change() local
178 if (head) in mall_change()
231 *arg = head; in mall_change()
250 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_delete() local
252 head->deleting = true; in mall_delete()
260 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_walk() local
265 if (!head || head->deleting) in mall_walk()
267 if (arg->fn(tp, head, arg) < 0) in mall_walk()
276 struct cls_mall_head *head = rtnl_dereference(tp->root); in mall_reoffload() local
281 if (tc_skip_hw(head->flags)) in mall_reoffload()
284 cls_mall.rule = flow_rule_alloc(tcf_exts_num_actions(&head->exts)); in mall_reoffload()
288 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack); in mall_reoffload()
291 cls_mall.cookie = (unsigned long)head; in mall_reoffload()
293 err = tc_setup_offload_action(&cls_mall.rule->action, &head->exts, in mall_reoffload()
298 return add && tc_skip_sw(head->flags) ? err : 0; in mall_reoffload()
302 &cls_mall, cb_priv, &head->flags, in mall_reoffload()
303 &head->in_hw_count); in mall_reoffload()
311 struct cls_mall_head *head, in mall_stats_hw_filter() argument
317 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, NULL); in mall_stats_hw_filter()
323 tcf_exts_hw_stats_update(&head->exts, &cls_mall.stats, cls_mall.use_act_stats); in mall_stats_hw_filter()
330 struct cls_mall_head *head = fh; in mall_dump() local
334 if (!head) in mall_dump()
337 if (!tc_skip_hw(head->flags)) in mall_dump()
338 mall_stats_hw_filter(tp, head, (unsigned long)head); in mall_dump()
340 t->tcm_handle = head->handle; in mall_dump()
346 if (head->res.classid && in mall_dump()
347 nla_put_u32(skb, TCA_MATCHALL_CLASSID, head->res.classid)) in mall_dump()
350 if (head->flags && nla_put_u32(skb, TCA_MATCHALL_FLAGS, head->flags)) in mall_dump()
354 struct tc_matchall_pcnt *pf = per_cpu_ptr(head->pf, cpu); in mall_dump()
364 if (tcf_exts_dump(skb, &head->exts)) in mall_dump()
369 if (tcf_exts_dump_stats(skb, &head->exts) < 0) in mall_dump()
382 struct cls_mall_head *head = fh; in mall_bind_class() local
384 tc_cls_bind_class(classid, cl, q, &head->res, base); in mall_bind_class()