Lines Matching refs:hash
68 u32 hash = 0; in batadv_choose_claim() local
70 hash = jhash(&claim->addr, sizeof(claim->addr), hash); in batadv_choose_claim()
71 hash = jhash(&claim->vid, sizeof(claim->vid), hash); in batadv_choose_claim()
73 return hash % size; in batadv_choose_claim()
86 u32 hash = 0; in batadv_choose_backbone_gw() local
89 hash = jhash(&gw->orig, sizeof(gw->orig), hash); in batadv_choose_backbone_gw()
90 hash = jhash(&gw->vid, sizeof(gw->vid), hash); in batadv_choose_backbone_gw()
92 return hash % size; in batadv_choose_backbone_gw()
220 struct batadv_hashtable *hash = bat_priv->bla.claim_hash; in batadv_claim_hash_find() local
226 if (!hash) in batadv_claim_hash_find()
229 index = batadv_choose_claim(data, hash->size); in batadv_claim_hash_find()
230 head = &hash->table[index]; in batadv_claim_hash_find()
260 struct batadv_hashtable *hash = bat_priv->bla.backbone_hash; in batadv_backbone_hash_find() local
266 if (!hash) in batadv_backbone_hash_find()
272 index = batadv_choose_backbone_gw(&search_entry, hash->size); in batadv_backbone_hash_find()
273 head = &hash->table[index]; in batadv_backbone_hash_find()
299 struct batadv_hashtable *hash; in batadv_bla_del_backbone_claims() local
306 hash = backbone_gw->bat_priv->bla.claim_hash; in batadv_bla_del_backbone_claims()
307 if (!hash) in batadv_bla_del_backbone_claims()
310 for (i = 0; i < hash->size; i++) { in batadv_bla_del_backbone_claims()
311 head = &hash->table[i]; in batadv_bla_del_backbone_claims()
312 list_lock = &hash->list_locks[i]; in batadv_bla_del_backbone_claims()
594 struct batadv_hashtable *hash; in batadv_bla_answer_request() local
609 hash = bat_priv->bla.claim_hash; in batadv_bla_answer_request()
610 for (i = 0; i < hash->size; i++) { in batadv_bla_answer_request()
611 head = &hash->table[i]; in batadv_bla_answer_request()
1223 struct batadv_hashtable *hash; in batadv_bla_purge_backbone_gw() local
1227 hash = bat_priv->bla.backbone_hash; in batadv_bla_purge_backbone_gw()
1228 if (!hash) in batadv_bla_purge_backbone_gw()
1231 for (i = 0; i < hash->size; i++) { in batadv_bla_purge_backbone_gw()
1232 head = &hash->table[i]; in batadv_bla_purge_backbone_gw()
1233 list_lock = &hash->list_locks[i]; in batadv_bla_purge_backbone_gw()
1278 struct batadv_hashtable *hash; in batadv_bla_purge_claims() local
1281 hash = bat_priv->bla.claim_hash; in batadv_bla_purge_claims()
1282 if (!hash) in batadv_bla_purge_claims()
1285 for (i = 0; i < hash->size; i++) { in batadv_bla_purge_claims()
1286 head = &hash->table[i]; in batadv_bla_purge_claims()
1333 struct batadv_hashtable *hash; in batadv_bla_update_orig_address() local
1351 hash = bat_priv->bla.backbone_hash; in batadv_bla_update_orig_address()
1352 if (!hash) in batadv_bla_update_orig_address()
1355 for (i = 0; i < hash->size; i++) { in batadv_bla_update_orig_address()
1356 head = &hash->table[i]; in batadv_bla_update_orig_address()
1431 struct batadv_hashtable *hash; in batadv_bla_periodic_work() local
1465 hash = bat_priv->bla.backbone_hash; in batadv_bla_periodic_work()
1466 if (!hash) in batadv_bla_periodic_work()
1469 for (i = 0; i < hash->size; i++) { in batadv_bla_periodic_work()
1470 head = &hash->table[i]; in batadv_bla_periodic_work()
1734 struct batadv_hashtable *hash = bat_priv->bla.backbone_hash; in batadv_bla_is_backbone_gw_orig() local
1742 if (!hash) in batadv_bla_is_backbone_gw_orig()
1745 for (i = 0; i < hash->size; i++) { in batadv_bla_is_backbone_gw_orig()
1746 head = &hash->table[i]; in batadv_bla_is_backbone_gw_orig()
2196 struct batadv_hashtable *hash, unsigned int bucket, in batadv_bla_claim_dump_bucket() argument
2203 spin_lock_bh(&hash->list_locks[bucket]); in batadv_bla_claim_dump_bucket()
2204 cb->seq = atomic_read(&hash->generation) << 1 | 1; in batadv_bla_claim_dump_bucket()
2206 hlist_for_each_entry(claim, &hash->table[bucket], hash_entry) { in batadv_bla_claim_dump_bucket()
2220 spin_unlock_bh(&hash->list_locks[bucket]); in batadv_bla_claim_dump_bucket()
2237 struct batadv_hashtable *hash; in batadv_bla_claim_dump() local
2256 hash = bat_priv->bla.claim_hash; in batadv_bla_claim_dump()
2264 while (bucket < hash->size) { in batadv_bla_claim_dump()
2266 hash, bucket, &idx)) in batadv_bla_claim_dump()
2366 struct batadv_hashtable *hash, in batadv_bla_backbone_dump_bucket() argument
2373 spin_lock_bh(&hash->list_locks[bucket]); in batadv_bla_backbone_dump_bucket()
2374 cb->seq = atomic_read(&hash->generation) << 1 | 1; in batadv_bla_backbone_dump_bucket()
2376 hlist_for_each_entry(backbone_gw, &hash->table[bucket], hash_entry) { in batadv_bla_backbone_dump_bucket()
2390 spin_unlock_bh(&hash->list_locks[bucket]); in batadv_bla_backbone_dump_bucket()
2407 struct batadv_hashtable *hash; in batadv_bla_backbone_dump() local
2426 hash = bat_priv->bla.backbone_hash; in batadv_bla_backbone_dump()
2434 while (bucket < hash->size) { in batadv_bla_backbone_dump()
2436 hash, bucket, &idx)) in batadv_bla_backbone_dump()