Lines Matching refs:hash
30 u32 hash; member
103 static inline struct hlist_head *select_bucket(struct bpf_htab *htab, u32 hash) in select_bucket() argument
105 return &htab->buckets[hash & (htab->n_buckets - 1)]; in select_bucket()
108 static struct htab_elem *lookup_elem_raw(struct hlist_head *head, u32 hash, in lookup_elem_raw() argument
114 if (l->hash == hash && !memcmp(&l->key, key, key_size)) in lookup_elem_raw()
126 u32 hash, key_size; in htab_map_lookup_elem() local
133 hash = htab_map_hash(key, key_size); in htab_map_lookup_elem()
135 head = select_bucket(htab, hash); in htab_map_lookup_elem()
137 l = lookup_elem_raw(head, hash, key, key_size); in htab_map_lookup_elem()
151 u32 hash, key_size; in htab_map_get_next_key() local
158 hash = htab_map_hash(key, key_size); in htab_map_get_next_key()
160 head = select_bucket(htab, hash); in htab_map_get_next_key()
163 l = lookup_elem_raw(head, hash, key, key_size); in htab_map_get_next_key()
181 i = hash & (htab->n_buckets - 1); in htab_map_get_next_key()
230 l_new->hash = htab_map_hash(l_new->key, key_size); in htab_map_update_elem()
235 head = select_bucket(htab, l_new->hash); in htab_map_update_elem()
237 l_old = lookup_elem_raw(head, l_new->hash, key, key_size); in htab_map_update_elem()
285 u32 hash, key_size; in htab_map_delete_elem() local
292 hash = htab_map_hash(key, key_size); in htab_map_delete_elem()
296 head = select_bucket(htab, hash); in htab_map_delete_elem()
298 l = lookup_elem_raw(head, hash, key, key_size); in htab_map_delete_elem()