Lines Matching defs:head

32 	struct cls_mall_head *head = rcu_dereference_bh(tp->root);
34 if (unlikely(!head))
37 if (tc_skip_sw(head->flags))
40 *res = head->res;
41 __this_cpu_inc(head->pf->rhit);
42 return tcf_exts_exec(skb, &head->exts, res);
50 static void __mall_destroy(struct cls_mall_head *head)
52 tcf_exts_destroy(&head->exts);
53 tcf_exts_put_net(&head->exts);
54 free_percpu(head->pf);
55 kfree(head);
60 struct cls_mall_head *head = container_of(to_rcu_work(work),
64 __mall_destroy(head);
69 struct cls_mall_head *head,
76 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack);
81 &head->flags, &head->in_hw_count, true);
85 struct cls_mall_head *head,
91 bool skip_sw = tc_skip_sw(head->flags);
94 cls_mall.rule = flow_rule_alloc(tcf_exts_num_actions(&head->exts));
98 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack);
102 err = tc_setup_offload_action(&cls_mall.rule->action, &head->exts,
106 mall_destroy_hw_filter(tp, head, cookie, NULL);
112 skip_sw, &head->flags, &head->in_hw_count, true);
117 mall_destroy_hw_filter(tp, head, cookie, NULL);
121 if (skip_sw && !(head->flags & TCA_CLS_FLAGS_IN_HW))
130 struct cls_mall_head *head = rtnl_dereference(tp->root);
132 if (!head)
135 tcf_unbind_filter(tp, &head->res);
137 if (!tc_skip_hw(head->flags))
138 mall_destroy_hw_filter(tp, head, (unsigned long) head, extack);
140 if (tcf_exts_get_net(&head->exts))
141 tcf_queue_work(&head->rwork, mall_destroy_work);
143 __mall_destroy(head);
148 struct cls_mall_head *head = rtnl_dereference(tp->root);
150 if (head && head->handle == handle)
151 return head;
168 struct cls_mall_head *head = rtnl_dereference(tp->root);
178 if (head)
233 *arg = head;
252 struct cls_mall_head *head = rtnl_dereference(tp->root);
254 head->deleting = true;
262 struct cls_mall_head *head = rtnl_dereference(tp->root);
267 if (!head || head->deleting)
269 if (arg->fn(tp, head, arg) < 0)
278 struct cls_mall_head *head = rtnl_dereference(tp->root);
283 if (tc_skip_hw(head->flags))
286 cls_mall.rule = flow_rule_alloc(tcf_exts_num_actions(&head->exts));
290 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack);
293 cls_mall.cookie = (unsigned long)head;
295 err = tc_setup_offload_action(&cls_mall.rule->action, &head->exts,
300 return add && tc_skip_sw(head->flags) ? err : 0;
304 &cls_mall, cb_priv, &head->flags,
305 &head->in_hw_count);
313 struct cls_mall_head *head,
319 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, NULL);
325 tcf_exts_hw_stats_update(&head->exts, &cls_mall.stats, cls_mall.use_act_stats);
332 struct cls_mall_head *head = fh;
336 if (!head)
339 if (!tc_skip_hw(head->flags))
340 mall_stats_hw_filter(tp, head, (unsigned long)head);
342 t->tcm_handle = head->handle;
348 if (head->res.classid &&
349 nla_put_u32(skb, TCA_MATCHALL_CLASSID, head->res.classid))
352 if (head->flags && nla_put_u32(skb, TCA_MATCHALL_FLAGS, head->flags))
356 struct tc_matchall_pcnt *pf = per_cpu_ptr(head->pf, cpu);
366 if (tcf_exts_dump(skb, &head->exts))
371 if (tcf_exts_dump_stats(skb, &head->exts) < 0)
384 struct cls_mall_head *head = fh;
386 tc_cls_bind_class(classid, cl, q, &head->res, base);