Lines Matching refs:mask_entry
210 struct nfp_mask_id_table *mask_entry; in nfp_add_mask_table() local
217 mask_entry = kmalloc(sizeof(*mask_entry), GFP_KERNEL); in nfp_add_mask_table()
218 if (!mask_entry) { in nfp_add_mask_table()
223 INIT_HLIST_NODE(&mask_entry->link); in nfp_add_mask_table()
224 mask_entry->mask_id = mask_id; in nfp_add_mask_table()
226 mask_entry->hash_key = hash_key; in nfp_add_mask_table()
227 mask_entry->ref_cnt = 1; in nfp_add_mask_table()
228 hash_add(priv->mask_table, &mask_entry->link, hash_key); in nfp_add_mask_table()
237 struct nfp_mask_id_table *mask_entry; in nfp_search_mask_table() local
242 hash_for_each_possible(priv->mask_table, mask_entry, link, hash_key) in nfp_search_mask_table()
243 if (mask_entry->hash_key == hash_key) in nfp_search_mask_table()
244 return mask_entry; in nfp_search_mask_table()
252 struct nfp_mask_id_table *mask_entry; in nfp_find_in_mask_table() local
254 mask_entry = nfp_search_mask_table(app, mask_data, mask_len); in nfp_find_in_mask_table()
255 if (!mask_entry) in nfp_find_in_mask_table()
258 mask_entry->ref_cnt++; in nfp_find_in_mask_table()
261 return mask_entry->mask_id; in nfp_find_in_mask_table()
286 struct nfp_mask_id_table *mask_entry; in nfp_check_mask_remove() local
288 mask_entry = nfp_search_mask_table(app, mask_data, mask_len); in nfp_check_mask_remove()
289 if (!mask_entry) in nfp_check_mask_remove()
292 *mask_id = mask_entry->mask_id; in nfp_check_mask_remove()
293 mask_entry->ref_cnt--; in nfp_check_mask_remove()
294 if (!mask_entry->ref_cnt) { in nfp_check_mask_remove()
295 hash_del(&mask_entry->link); in nfp_check_mask_remove()
297 kfree(mask_entry); in nfp_check_mask_remove()