| /linux/include/linux/ |
| H A D | hashtable.h | 126 #define hash_for_each(name, bkt, obj, member) \ argument 127 for ((bkt) = 0, obj = NULL; obj == NULL && (bkt) < HASH_SIZE(name);\ 128 (bkt)++)\ 129 hlist_for_each_entry(obj, &name[bkt], member) 138 #define hash_for_each_rcu(name, bkt, obj, member) \ argument 139 for ((bkt) = 0, obj = NULL; obj == NULL && (bkt) < HASH_SIZE(name);\ 140 (bkt)++)\ 141 hlist_for_each_entry_rcu(obj, &name[bkt], member) 152 #define hash_for_each_safe(name, bkt, tmp, obj, member) \ argument 153 for ((bkt) = 0, obj = NULL; obj == NULL && (bkt) < HASH_SIZE(name);\ [all …]
|
| H A D | rhashtable.h | 327 struct rhash_lock_head __rcu **bkt) in rht_lock() argument 332 bit_spin_lock(0, (unsigned long *)bkt); in rht_lock() 350 struct rhash_lock_head __rcu **bkt, in rht_unlock() argument 354 bit_spin_unlock(0, (unsigned long *)bkt); in rht_unlock() 359 struct rhash_lock_head *p, struct rhash_lock_head __rcu *const *bkt) in __rht_ptr() argument 363 (unsigned long)RHT_NULLS_MARKER(bkt)); in __rht_ptr() 374 struct rhash_lock_head __rcu *const *bkt) in rht_ptr_rcu() argument 376 return __rht_ptr(rcu_dereference_all(*bkt), bkt); in rht_ptr_rcu() 380 struct rhash_lock_head __rcu *const *bkt, in rht_ptr() argument 384 return __rht_ptr(rht_dereference_bucket(*bkt, tbl, hash), bkt); in rht_ptr() [all …]
|
| /linux/fs/smb/client/ |
| H A D | compress.c | 63 static bool has_low_entropy(struct bucket *bkt, size_t slen) in has_low_entropy() argument 71 for (i = 0; i < 256 && bkt[i].count > 0; i++) { in has_low_entropy() 72 p = bkt[i].count; in has_low_entropy() 98 static int calc_byte_distribution(struct bucket *bkt, size_t slen) in calc_byte_distribution() argument 105 sum += bkt[i].count; in calc_byte_distribution() 110 for (; i < high && bkt[i].count > 0; i++) { in calc_byte_distribution() 111 sum += bkt[i].count; in calc_byte_distribution() 125 static bool is_mostly_ascii(const struct bucket *bkt) in is_mostly_ascii() argument 131 if (bkt[i].count > 0) in is_mostly_ascii() 197 struct bucket *bkt = NULL; in is_compressible() local [all …]
|
| /linux/tools/include/linux/ |
| H A D | hashtable.h | 105 #define hash_for_each(name, bkt, obj, member) \ argument 106 for ((bkt) = 0, obj = NULL; obj == NULL && (bkt) < HASH_SIZE(name);\ 107 (bkt)++)\ 108 hlist_for_each_entry(obj, &name[bkt], member) 119 #define hash_for_each_safe(name, bkt, tmp, obj, member) \ argument 120 for ((bkt) = 0, obj = NULL; obj == NULL && (bkt) < HASH_SIZE(name);\ 121 (bkt)++)\ 122 hlist_for_each_entry_safe(obj, tmp, &name[bkt], member)
|
| /linux/tools/perf/util/ |
| H A D | hashmap.h | 168 #define hashmap__for_each_entry(map, cur, bkt) \ argument 169 for (bkt = 0; bkt < (map)->cap; bkt++) \ 170 for (cur = (map)->buckets[bkt]; cur; cur = cur->next) 180 #define hashmap__for_each_entry_safe(map, cur, tmp, bkt) \ argument 181 for (bkt = 0; bkt < (map)->cap; bkt++) \ 182 for (cur = (map)->buckets[bkt]; \
|
| H A D | expr.c | 79 size_t bkt; in ids__free() local 84 hashmap__for_each_entry(ids, cur, bkt) { in ids__free() 108 size_t bkt; in ids__union() local 126 hashmap__for_each_entry(ids2, cur, bkt) { in ids__union() 231 size_t bkt; in expr__subset_of_ids() local 234 hashmap__for_each_entry(needles->ids, cur, bkt) { in expr__subset_of_ids() 310 size_t bkt; in expr__ctx_clear() local 312 hashmap__for_each_entry(ctx->ids, cur, bkt) { in expr__ctx_clear() 322 size_t bkt; in expr__ctx_free() local 328 hashmap__for_each_entry(ctx->ids, cur, bkt) { in expr__ctx_free()
|
| H A D | hwmon_pmu.c | 240 size_t bkt; in hwmon_pmu__read_events() local 323 hashmap__for_each_entry_safe((&pmu->events), cur, tmp, bkt) { in hwmon_pmu__read_events() 397 size_t bkt; in hwmon_pmu__exit() local 399 hashmap__for_each_entry_safe((&hwm->events), cur, tmp, bkt) { in hwmon_pmu__exit() 463 size_t bkt; in hwmon_pmu__for_each_event() local 468 hashmap__for_each_entry((&hwm->events), cur, bkt) { in hwmon_pmu__for_each_event() 560 size_t bkt; in hwmon_pmu__have_event() local 575 hashmap__for_each_entry((&hwm->events), cur, bkt) { in hwmon_pmu__have_event() 602 size_t bkt; in hwmon_pmu__config_term() local 605 hashmap__for_each_entry((&hwm->events), cur, bkt) { in hwmon_pmu__config_term()
|
| H A D | threads.c | 140 size_t bkt; in threads__remove_all_threads() local 144 hashmap__for_each_entry_safe(&table->shard, cur, tmp, bkt) { in threads__remove_all_threads() 175 size_t bkt; in threads__for_each_thread() local 178 hashmap__for_each_entry(&table->shard, cur, bkt) { in threads__for_each_thread()
|
| H A D | hashmap.c | 66 size_t bkt; in hashmap__clear() local 68 hashmap__for_each_entry_safe(map, cur, tmp, bkt) { in hashmap__clear() 106 size_t h, bkt; in hashmap_grow() local 117 hashmap__for_each_entry_safe(map, cur, tmp, bkt) { in hashmap_grow()
|
| /linux/tools/lib/bpf/ |
| H A D | hashmap.h | 168 #define hashmap__for_each_entry(map, cur, bkt) \ argument 169 for (bkt = 0; bkt < (map)->cap; bkt++) \ 170 for (cur = (map)->buckets[bkt]; cur; cur = cur->next) 180 #define hashmap__for_each_entry_safe(map, cur, tmp, bkt) \ argument 181 for (bkt = 0; bkt < (map)->cap; bkt++) \ 182 for (cur = (map)->buckets[bkt]; \
|
| H A D | hashmap.c | 66 size_t bkt; in hashmap__clear() local 68 hashmap__for_each_entry_safe(map, cur, tmp, bkt) { in hashmap__clear() 106 size_t h, bkt; in hashmap_grow() local 117 hashmap__for_each_entry_safe(map, cur, tmp, bkt) { in hashmap_grow()
|
| /linux/drivers/infiniband/ulp/opa_vnic/ |
| H A D | opa_vnic_internal.h | 280 #define vnic_hash_for_each_safe(name, bkt, tmp, obj, member) \ argument 281 for ((bkt) = 0, obj = NULL; \ 282 !obj && (bkt) < OPA_VNIC_MAC_TBL_SIZE; (bkt)++) \ 283 hlist_for_each_entry_safe(obj, tmp, &name[bkt], member) 289 #define vnic_hash_for_each(name, bkt, obj, member) \ argument 290 for ((bkt) = 0, obj = NULL; \ 291 !obj && (bkt) < OPA_VNIC_MAC_TBL_SIZE; (bkt)++) \ 292 hlist_for_each_entry(obj, &name[bkt], member)
|
| H A D | opa_vnic_encap.c | 107 int bkt; in opa_vnic_free_mac_tbl() local 112 vnic_hash_for_each_safe(mactbl, bkt, tmp, node, hlist) { in opa_vnic_free_mac_tbl() 157 int bkt; in opa_vnic_query_mac_tbl() local 168 vnic_hash_for_each(mactbl, bkt, node, hlist) { in opa_vnic_query_mac_tbl() 209 int i, bkt, rc = 0; in opa_vnic_update_mac_tbl() local 263 vnic_hash_for_each(old_mactbl, bkt, node, hlist) { in opa_vnic_update_mac_tbl()
|
| /linux/lib/tests/ |
| H A D | hashtable_test.c | 68 int bkt; in hashtable_test_hash_add() local 80 hash_for_each(hash, bkt, x, node) { in hashtable_test_hash_add() 127 int bkt, i, j, count; in hashtable_test_hash_for_each() local 139 hash_for_each(hash, bkt, x, node) { in hashtable_test_hash_for_each() 157 int bkt, i, j, count; in hashtable_test_hash_for_each_safe() local 169 hash_for_each_safe(hash, bkt, tmp, x, node) { in hashtable_test_hash_for_each_safe() 190 int bkt, i, j, count; in hashtable_test_hash_for_each_possible() local 220 hash_for_each(hash, bkt, y, node) { in hashtable_test_hash_for_each_possible() 223 buckets[y->key] = bkt; in hashtable_test_hash_for_each_possible() 245 int bkt, i, j, count; in hashtable_test_hash_for_each_possible_safe() local [all …]
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | hashmap.c | 47 int err, bkt, found_cnt, i; in test_hashmap_generic() local 92 hashmap__for_each_entry(map, entry, bkt) { in test_hashmap_generic() 140 hashmap__for_each_entry_safe(map, entry, tmp, bkt) { in test_hashmap_generic() 197 hashmap__for_each_entry_safe(map, entry, tmp, bkt) { in test_hashmap_generic() 230 hashmap__for_each_entry(map, entry, bkt) { in test_hashmap_generic() 238 hashmap__for_each_entry(map, entry, bkt) { in test_hashmap_generic() 265 int err, i, bkt; in test_hashmap_ptr_iface() local 319 hashmap__for_each_entry(map, cur, bkt) { in test_hashmap_ptr_iface() 345 int err, bkt; in test_hashmap_multimap() local 382 hashmap__for_each_entry(map, entry, bkt) { in test_hashmap_multimap() [all …]
|
| /linux/lib/ |
| H A D | rhashtable.c | 229 struct rhash_lock_head __rcu **bkt, in rhashtable_rehash_one() argument 245 rht_for_each_from(entry, rht_ptr(bkt, old_tbl, old_hash), in rhashtable_rehash_one() 274 rht_assign_locked(bkt, next); in rhashtable_rehash_one() 284 struct rhash_lock_head __rcu **bkt = rht_bucket_var(old_tbl, old_hash); in rhashtable_rehash_chain() local 288 if (!bkt) in rhashtable_rehash_chain() 290 flags = rht_lock(old_tbl, bkt); in rhashtable_rehash_chain() 292 while (!(err = rhashtable_rehash_one(ht, bkt, old_hash))) in rhashtable_rehash_chain() 297 rht_unlock(old_tbl, bkt, flags); in rhashtable_rehash_chain() 495 struct rhash_lock_head __rcu **bkt, in rhashtable_lookup_one() argument 508 rht_for_each_from(head, rht_ptr(bkt, tbl, hash), tbl, hash) { in rhashtable_lookup_one() [all …]
|
| /linux/drivers/s390/crypto/ |
| H A D | ap_card.c | 80 int bkt; in request_count_store() local 85 hash_for_each(ap_queues, bkt, aq, hnode) in request_count_store() 99 int bkt; in requestq_count_show() local 106 hash_for_each(ap_queues, bkt, aq, hnode) in requestq_count_show() 118 int bkt; in pendingq_count_show() local 125 hash_for_each(ap_queues, bkt, aq, hnode) in pendingq_count_show()
|
| /linux/net/ipv6/ |
| H A D | calipso.c | 203 u32 bkt; in calipso_cache_check() local 212 bkt = hash & (CALIPSO_CACHE_BUCKETS - 1); in calipso_cache_check() 213 spin_lock_bh(&calipso_cache[bkt].lock); in calipso_cache_check() 214 list_for_each_entry(entry, &calipso_cache[bkt].list, list) { in calipso_cache_check() 224 spin_unlock_bh(&calipso_cache[bkt].lock); in calipso_cache_check() 239 spin_unlock_bh(&calipso_cache[bkt].lock); in calipso_cache_check() 244 spin_unlock_bh(&calipso_cache[bkt].lock); in calipso_cache_check() 268 u32 bkt; in calipso_cache_add() local 291 bkt = entry->hash & (CALIPSO_CACHE_BUCKETS - 1); in calipso_cache_add() 292 spin_lock_bh(&calipso_cache[bkt].lock); in calipso_cache_add() [all …]
|
| /linux/fs/smb/server/ |
| H A D | connection.c | 98 int bkt; in ksmbd_conn_lookup_dialect() local 102 hash_for_each(conn_list, bkt, t, hlist) { in ksmbd_conn_lookup_dialect() 163 int bkt; in ksmbd_all_conn_set_status() local 166 hash_for_each(conn_list, bkt, conn, hlist) { in ksmbd_all_conn_set_status() 182 int rcount = 1, bkt; in ksmbd_conn_wait_idle_sess_id() local 189 hash_for_each(conn_list, bkt, conn, hlist) { in ksmbd_conn_wait_idle_sess_id() 481 int bkt; in stop_sessions() local 485 hash_for_each(conn_list, bkt, conn, hlist) { in stop_sessions()
|
| /linux/drivers/net/ethernet/intel/ice/ |
| H A D | ice_sriov.c | 29 unsigned int bkt; in ice_free_vf_entries() local 37 hash_for_each_safe(vfs->table, bkt, tmp, vf, entry) { in ice_free_vf_entries() 137 unsigned int bkt; in ice_free_vfs() local 156 ice_for_each_vf(pf, bkt, vf) { in ice_free_vfs() 470 unsigned int bkt, it_cnt; in ice_start_vfs() local 477 ice_for_each_vf(pf, bkt, vf) { in ice_start_vfs() 505 ice_for_each_vf(pf, bkt, vf) { in ice_start_vfs() 880 int to_remap = 0, bkt; in ice_sriov_remap_vectors() local 885 ice_for_each_vf(pf, bkt, tmp_vf) { in ice_sriov_remap_vectors() 1077 unsigned int bkt; in ice_process_vflr_event() local [all …]
|
| H A D | ice_vf_lib.h | 220 #define ice_for_each_vf(pf, bkt, vf) \ argument 221 hash_for_each((pf)->vfs.table, (bkt), (vf), entry) 237 #define ice_for_each_vf_rcu(pf, bkt, vf) \ argument 238 hash_for_each_rcu((pf)->vfs.table, (bkt), (vf), entry)
|
| H A D | ice_vf_lib.c | 108 unsigned int bkt; in ice_get_num_vfs() local 112 ice_for_each_vf_rcu(pf, bkt, vf) in ice_get_num_vfs() 580 unsigned int bkt; in ice_is_any_vf_in_unicast_promisc() local 583 ice_for_each_vf_rcu(pf, bkt, vf) { in ice_is_any_vf_in_unicast_promisc() 753 unsigned int bkt; in ice_reset_all_vfs() local 762 ice_for_each_vf(pf, bkt, vf) in ice_reset_all_vfs() 772 ice_for_each_vf(pf, bkt, vf) in ice_reset_all_vfs() 779 ice_for_each_vf(pf, bkt, vf) { in ice_reset_all_vfs() 791 ice_for_each_vf(pf, bkt, vf) { in ice_reset_all_vfs() 1382 unsigned int bkt; in ice_get_vf_ctrl_vsi() local [all …]
|
| /linux/net/ipv4/ |
| H A D | cipso_ipv4.c | 237 u32 bkt; in cipso_v4_cache_check() local 246 bkt = hash & (CIPSO_V4_CACHE_BUCKETS - 1); in cipso_v4_cache_check() 247 spin_lock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_check() 248 list_for_each_entry(entry, &cipso_v4_cache[bkt].list, list) { in cipso_v4_cache_check() 258 spin_unlock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_check() 273 spin_unlock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_check() 278 spin_unlock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_check() 301 u32 bkt; in cipso_v4_cache_add() local 324 bkt = entry->hash & (CIPSO_V4_CACHE_BUCKETS - 1); in cipso_v4_cache_add() 325 spin_lock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_add() [all …]
|
| /linux/net/sched/ |
| H A D | cls_route.c | 55 struct route4_bucket *bkt; member 328 b = f->bkt; in route4_delete() 465 f->bkt = b; in route4_set_parms() 524 f->bkt = fold->bkt; in route4_change() 534 fp = &f->bkt->ht[h]; in route4_change()
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
| H A D | vxlan.c | 183 int bkt; in mlx5_vxlan_reset_to_default() local 188 hash_for_each_safe(vxlan->htable, bkt, tmp, vxlanp, hlist) { in mlx5_vxlan_reset_to_default()
|