Lines Matching refs:hash
196 static inline void free_hash_table(struct eth_hash_t *hash) in free_hash_table() argument
201 if (hash) { in free_hash_table()
202 if (hash->lsts) { in free_hash_table()
203 for (i = 0; i < hash->size; i++) { in free_hash_table()
205 dequeue_addr_from_hash_entry(&hash->lsts[i]); in free_hash_table()
209 dequeue_addr_from_hash_entry(&hash-> in free_hash_table()
214 kfree(hash->lsts); in free_hash_table()
217 kfree(hash); in free_hash_table()
224 struct eth_hash_t *hash; in alloc_hash_table() local
227 hash = kmalloc(sizeof(*hash), GFP_KERNEL); in alloc_hash_table()
228 if (!hash) in alloc_hash_table()
231 hash->size = size; in alloc_hash_table()
233 hash->lsts = kmalloc_array(hash->size, sizeof(struct list_head), in alloc_hash_table()
235 if (!hash->lsts) { in alloc_hash_table()
236 kfree(hash); in alloc_hash_table()
240 for (i = 0; i < hash->size; i++) in alloc_hash_table()
241 INIT_LIST_HEAD(&hash->lsts[i]); in alloc_hash_table()
243 return hash; in alloc_hash_table()