Lines Matching refs:hash
30 u32 hash; member
123 static inline struct hlist_head *select_bucket(struct bpf_htab *htab, u32 hash) in select_bucket() argument
125 return &htab->buckets[hash & (htab->n_buckets - 1)]; in select_bucket()
128 static struct htab_elem *lookup_elem_raw(struct hlist_head *head, u32 hash, in lookup_elem_raw() argument
134 if (l->hash == hash && !memcmp(&l->key, key, key_size)) in lookup_elem_raw()
146 u32 hash, key_size; in htab_map_lookup_elem() local
153 hash = htab_map_hash(key, key_size); in htab_map_lookup_elem()
155 head = select_bucket(htab, hash); in htab_map_lookup_elem()
157 l = lookup_elem_raw(head, hash, key, key_size); in htab_map_lookup_elem()
171 u32 hash, key_size; in htab_map_get_next_key() local
178 hash = htab_map_hash(key, key_size); in htab_map_get_next_key()
180 head = select_bucket(htab, hash); in htab_map_get_next_key()
183 l = lookup_elem_raw(head, hash, key, key_size); in htab_map_get_next_key()
201 i = hash & (htab->n_buckets - 1); in htab_map_get_next_key()
250 l_new->hash = htab_map_hash(l_new->key, key_size); in htab_map_update_elem()
255 head = select_bucket(htab, l_new->hash); in htab_map_update_elem()
257 l_old = lookup_elem_raw(head, l_new->hash, key, key_size); in htab_map_update_elem()
305 u32 hash, key_size; in htab_map_delete_elem() local
312 hash = htab_map_hash(key, key_size); in htab_map_delete_elem()
316 head = select_bucket(htab, hash); in htab_map_delete_elem()
318 l = lookup_elem_raw(head, hash, key, key_size); in htab_map_delete_elem()