Lines Matching refs: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)
231 *arg = head;
250 struct cls_mall_head *head = rtnl_dereference(tp->root);
252 head->deleting = true;
260 struct cls_mall_head *head = rtnl_dereference(tp->root);
265 if (!head || head->deleting)
267 if (arg->fn(tp, head, arg) < 0)
276 struct cls_mall_head *head = rtnl_dereference(tp->root);
281 if (tc_skip_hw(head->flags))
284 cls_mall.rule = flow_rule_alloc(tcf_exts_num_actions(&head->exts));
288 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack);
291 cls_mall.cookie = (unsigned long)head;
293 err = tc_setup_offload_action(&cls_mall.rule->action, &head->exts,
298 return add && tc_skip_sw(head->flags) ? err : 0;
302 &cls_mall, cb_priv, &head->flags,
303 &head->in_hw_count);
311 struct cls_mall_head *head,
317 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, NULL);
323 tcf_exts_hw_stats_update(&head->exts, &cls_mall.stats, cls_mall.use_act_stats);
330 struct cls_mall_head *head = fh;
334 if (!head)
337 if (!tc_skip_hw(head->flags))
338 mall_stats_hw_filter(tp, head, (unsigned long)head);
340 t->tcm_handle = head->handle;
346 if (head->res.classid &&
347 nla_put_u32(skb, TCA_MATCHALL_CLASSID, head->res.classid))
350 if (head->flags && nla_put_u32(skb, TCA_MATCHALL_FLAGS, head->flags))
354 struct tc_matchall_pcnt *pf = per_cpu_ptr(head->pf, cpu);
364 if (tcf_exts_dump(skb, &head->exts))
369 if (tcf_exts_dump_stats(skb, &head->exts) < 0)
382 struct cls_mall_head *head = fh;
384 tc_cls_bind_class(classid, cl, q, &head->res, base);