/openbmc/qemu/util/ |
H A D | throttle.c | 44 bkt->level = MAX(bkt->level - leak, 0); in throttle_leak_bucket() 51 bkt->burst_level = MAX(bkt->burst_level - leak, 0); in throttle_leak_bucket() 101 if (!bkt->avg) { in throttle_compute_wait() 105 if (!bkt->max) { in throttle_compute_wait() 114 bucket_size = bkt->max * bkt->burst_length; in throttle_compute_wait() 354 if (bkt->avg > THROTTLE_VALUE_MAX || bkt->max > THROTTLE_VALUE_MAX) { in throttle_is_valid() 365 if (bkt->burst_length > 1 && !bkt->max) { in throttle_is_valid() 370 if (bkt->max && bkt->burst_length > THROTTLE_VALUE_MAX / bkt->max) { in throttle_is_valid() 375 if (bkt->max && !bkt->avg) { in throttle_is_valid() 381 if (bkt->max && bkt->max < bkt->avg) { in throttle_is_valid() [all …]
|
/openbmc/qemu/tests/unit/ |
H A D | test-throttle.c | 46 bkt.avg = 150; in test_leak_bucket() 47 bkt.max = 15; in test_leak_bucket() 70 bkt.max = 250; in test_leak_bucket() 95 bkt.avg = 0; in test_compute_wait() 96 bkt.max = 15; in test_compute_wait() 102 bkt.avg = 150; in test_compute_wait() 103 bkt.max = 15; in test_compute_wait() 110 bkt.max = 15; in test_compute_wait() 117 bkt.max = 15; in test_compute_wait() 127 bkt.avg = 10; in test_compute_wait() [all …]
|
/openbmc/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) 153 for ((bkt) = 0, obj = NULL; obj == NULL && (bkt) < HASH_SIZE(name);\ 154 (bkt)++)\ [all …]
|
H A D | rhashtable.h | 376 return __rht_ptr(rcu_dereference(*bkt), bkt); in rht_ptr_rcu() 384 return __rht_ptr(rht_dereference_bucket(*bkt, tbl, hash), bkt); in rht_ptr() 390 return __rht_ptr(rcu_dereference_protected(*bkt, 1), bkt); in rht_ptr_exclusive() 605 bkt = rht_bucket(tbl, hash); in __rhashtable_lookup() 729 if (!bkt) in __rhashtable_insert_fast() 732 flags = rht_lock(tbl, bkt); in __rhashtable_insert_fast() 809 rht_unlock(tbl, bkt, flags); in __rhashtable_insert_fast() 1009 if (!bkt) in __rhashtable_remove_fast_one() 1012 flags = rht_lock(tbl, bkt); in __rhashtable_remove_fast_one() 1168 if (!bkt) in __rhashtable_replace_fast() [all …]
|
/openbmc/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)
|
/openbmc/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()
|
/openbmc/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 | 86 size_t bkt; in ids__free() local 91 hashmap__for_each_entry(ids, cur, bkt) { in ids__free() 115 size_t bkt; in ids__union() local 133 hashmap__for_each_entry(ids2, cur, bkt) { in ids__union() 232 size_t bkt; in expr__subset_of_ids() local 235 hashmap__for_each_entry(needles->ids, cur, bkt) { in expr__subset_of_ids() 314 size_t bkt; in expr__ctx_clear() local 316 hashmap__for_each_entry(ctx->ids, cur, bkt) { in expr__ctx_clear() 326 size_t bkt; in expr__ctx_free() local 332 hashmap__for_each_entry(ctx->ids, cur, bkt) { in expr__ctx_free()
|
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()
|
/openbmc/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()
|
/openbmc/linux/lib/ |
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 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 278 hash_for_each(hash, bkt, y, node) { in hashtable_test_hash_for_each_possible_safe() [all …]
|
H A D | rhashtable.c | 270 rht_assign_locked(bkt, next); in rhashtable_rehash_one() 284 if (!bkt) in rhashtable_rehash_chain() 286 flags = rht_lock(old_tbl, bkt); in rhashtable_rehash_chain() 293 rht_unlock(old_tbl, bkt, flags); in rhashtable_rehash_chain() 530 rht_assign_locked(bkt, obj); in rhashtable_lookup_one() 568 head = rht_ptr(bkt, tbl, hash); in rhashtable_insert_one() 581 rht_assign_locked(bkt, obj); in rhashtable_insert_one() 607 bkt = rht_bucket_var(tbl, hash); in rhashtable_try_insert() 610 if (bkt == NULL) { in rhashtable_try_insert() 614 flags = rht_lock(tbl, bkt); in rhashtable_try_insert() [all …]
|
/openbmc/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() 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() 414 int bkt; in test_hashmap_empty() local [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_eswitch.c | 198 unsigned int bkt; in ice_eswitch_release_reprs() local 202 ice_for_each_vf(pf, bkt, vf) { in ice_eswitch_release_reprs() 229 unsigned int bkt; in ice_eswitch_setup_reprs() local 433 unsigned int bkt; in ice_eswitch_napi_del() local 437 ice_for_each_vf(pf, bkt, vf) in ice_eswitch_napi_del() 448 unsigned int bkt; in ice_eswitch_napi_enable() local 452 ice_for_each_vf(pf, bkt, vf) in ice_eswitch_napi_enable() 463 unsigned int bkt; in ice_eswitch_napi_disable() local 467 ice_for_each_vf(pf, bkt, vf) in ice_eswitch_napi_disable() 657 unsigned int bkt; in ice_eswitch_start_all_tx_queues() local [all …]
|
H A D | ice_vf_lib.h | 190 #define ice_for_each_vf(pf, bkt, vf) \ argument 191 hash_for_each((pf)->vfs.table, (bkt), (vf), entry) 207 #define ice_for_each_vf_rcu(pf, bkt, vf) \ argument 208 hash_for_each_rcu((pf)->vfs.table, (bkt), (vf), entry)
|
H A D | ice_vf_lib.c | 106 unsigned int bkt; in ice_get_num_vfs() local 110 ice_for_each_vf_rcu(pf, bkt, vf) in ice_get_num_vfs() 564 unsigned int bkt; in ice_is_any_vf_in_unicast_promisc() local 567 ice_for_each_vf_rcu(pf, bkt, vf) { in ice_is_any_vf_in_unicast_promisc() 720 unsigned int bkt; in ice_reset_all_vfs() local 729 ice_for_each_vf(pf, bkt, vf) in ice_reset_all_vfs() 739 ice_for_each_vf(pf, bkt, vf) in ice_reset_all_vfs() 746 ice_for_each_vf(pf, bkt, vf) { in ice_reset_all_vfs() 758 ice_for_each_vf(pf, bkt, vf) { in ice_reset_all_vfs() 1347 unsigned int bkt; in ice_get_vf_ctrl_vsi() local [all …]
|
H A D | ice_sriov.c | 29 unsigned int bkt; in ice_free_vf_entries() local 156 unsigned int bkt; in ice_free_vfs() local 177 ice_for_each_vf(pf, bkt, vf) { in ice_free_vfs() 566 unsigned int bkt, it_cnt; in ice_start_vfs() local 573 ice_for_each_vf(pf, bkt, vf) { in ice_start_vfs() 593 ice_for_each_vf(pf, bkt, vf) { in ice_start_vfs() 1006 unsigned int bkt; in ice_process_vflr_event() local 1014 ice_for_each_vf(pf, bkt, vf) { in ice_process_vflr_event() 1043 unsigned int bkt; in ice_get_vf_from_pfq() local 1380 unsigned int bkt; in ice_calc_all_vfs_min_tx_rate() local [all …]
|
H A D | ice_repr.c | 380 unsigned int bkt; in ice_repr_rem_from_all_vfs() local 384 ice_for_each_vf(pf, bkt, vf) in ice_repr_rem_from_all_vfs() 404 unsigned int bkt; in ice_repr_add_for_all_vfs() local 409 ice_for_each_vf(pf, bkt, vf) { in ice_repr_add_for_all_vfs()
|
/openbmc/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()
|
/openbmc/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() 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() 295 calipso_cache[bkt].size += 1; in calipso_cache_add() [all …]
|
/openbmc/openbmc/poky/meta/classes/ |
H A D | ccmake.bbclass | 51 for bk, bkt, bv in b: 54 if bkt != akt or bv != av: # changed 56 added.append((bk, bkt, bv)) 63 for bk, bkt, bv in b: 65 added.append((bk, bkt, bv))
|
/openbmc/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() 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 325 spin_lock_bh(&cipso_v4_cache[bkt].lock); in cipso_v4_cache_add() 326 if (cipso_v4_cache[bkt].size < bkt_size) { in cipso_v4_cache_add() 328 cipso_v4_cache[bkt].size += 1; in cipso_v4_cache_add() [all …]
|
/openbmc/qemu/include/qemu/ |
H A D | throttle.h | 118 void throttle_leak_bucket(LeakyBucket *bkt, int64_t delta); 120 int64_t throttle_compute_wait(LeakyBucket *bkt);
|