Lines Matching refs:head

65 	struct cls_bpf_head *head = rcu_dereference_bh(tp->root);  in cls_bpf_classify()  local
74 list_for_each_entry_rcu(prog, &head->plist, link) { in cls_bpf_classify()
102 struct cls_bpf_head *head; in cls_bpf_init() local
104 head = kzalloc(sizeof(*head), GFP_KERNEL); in cls_bpf_init()
105 if (head == NULL) in cls_bpf_init()
108 INIT_LIST_HEAD_RCU(&head->plist); in cls_bpf_init()
109 rcu_assign_pointer(tp->root, head); in cls_bpf_init()
148 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_destroy() local
151 if (!force && !list_empty(&head->plist)) in cls_bpf_destroy()
154 list_for_each_entry_safe(prog, tmp, &head->plist, link) { in cls_bpf_destroy()
161 kfree_rcu(head, rcu); in cls_bpf_destroy()
167 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_get() local
171 if (head == NULL) in cls_bpf_get()
174 list_for_each_entry(prog, &head->plist, link) { in cls_bpf_get()
302 struct cls_bpf_head *head) in cls_bpf_grab_new_handle() argument
308 if (++head->hgen == 0x7FFFFFFF) in cls_bpf_grab_new_handle()
309 head->hgen = 1; in cls_bpf_grab_new_handle()
310 } while (--i > 0 && cls_bpf_get(tp, head->hgen)); in cls_bpf_grab_new_handle()
316 handle = head->hgen; in cls_bpf_grab_new_handle()
327 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_change() local
354 prog->handle = cls_bpf_grab_new_handle(tp, head); in cls_bpf_change()
371 list_add_rcu(&prog->link, &head->plist); in cls_bpf_change()
456 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_walk() local
459 list_for_each_entry(prog, &head->plist, link) { in cls_bpf_walk()