Lines Matching refs:hash
224 static inline void free_hash_table(struct eth_hash_t *hash) in free_hash_table() argument
229 if (hash) { in free_hash_table()
230 if (hash->lsts) { in free_hash_table()
231 for (i = 0; i < hash->size; i++) { in free_hash_table()
233 dequeue_addr_from_hash_entry(&hash->lsts[i]); in free_hash_table()
237 dequeue_addr_from_hash_entry(&hash-> in free_hash_table()
242 kfree(hash->lsts); in free_hash_table()
245 kfree(hash); in free_hash_table()
252 struct eth_hash_t *hash; in alloc_hash_table() local
255 hash = kmalloc(sizeof(*hash), GFP_KERNEL); in alloc_hash_table()
256 if (!hash) in alloc_hash_table()
259 hash->size = size; in alloc_hash_table()
261 hash->lsts = kmalloc_array(hash->size, sizeof(struct list_head), in alloc_hash_table()
263 if (!hash->lsts) { in alloc_hash_table()
264 kfree(hash); in alloc_hash_table()
268 for (i = 0; i < hash->size; i++) in alloc_hash_table()
269 INIT_LIST_HEAD(&hash->lsts[i]); in alloc_hash_table()
271 return hash; in alloc_hash_table()