Lines Matching refs:head

81 	struct cls_bpf_head *head = rcu_dereference_bh(tp->root);  in cls_bpf_classify()  local
95 list_for_each_entry_rcu(prog, &head->plist, link) { in cls_bpf_classify()
144 struct cls_bpf_head *head; in cls_bpf_init() local
146 head = kzalloc(sizeof(*head), GFP_KERNEL); in cls_bpf_init()
147 if (head == NULL) in cls_bpf_init()
150 INIT_LIST_HEAD_RCU(&head->plist); in cls_bpf_init()
151 rcu_assign_pointer(tp->root, head); in cls_bpf_init()
190 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_destroy() local
193 if (!force && !list_empty(&head->plist)) in cls_bpf_destroy()
196 list_for_each_entry_safe(prog, tmp, &head->plist, link) { in cls_bpf_destroy()
203 kfree_rcu(head, rcu); in cls_bpf_destroy()
209 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_get() local
213 if (head == NULL) in cls_bpf_get()
216 list_for_each_entry(prog, &head->plist, link) { in cls_bpf_get()
353 struct cls_bpf_head *head) in cls_bpf_grab_new_handle() argument
359 if (++head->hgen == 0x7FFFFFFF) in cls_bpf_grab_new_handle()
360 head->hgen = 1; in cls_bpf_grab_new_handle()
361 } while (--i > 0 && cls_bpf_get(tp, head->hgen)); in cls_bpf_grab_new_handle()
367 handle = head->hgen; in cls_bpf_grab_new_handle()
378 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_change() local
405 prog->handle = cls_bpf_grab_new_handle(tp, head); in cls_bpf_change()
422 list_add_rcu(&prog->link, &head->plist); in cls_bpf_change()
514 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_walk() local
517 list_for_each_entry(prog, &head->plist, link) { in cls_bpf_walk()