Home
last modified time | relevance | path

Searched refs:n_buckets (Results 1 – 8 of 8) sorted by relevance

/linux-6.1.9/kernel/bpf/
Dstackmap.c30 u32 n_buckets; member
74 u64 cost, n_buckets; in stack_map_alloc() local
98 n_buckets = roundup_pow_of_two(attr->max_entries); in stack_map_alloc()
99 if (!n_buckets) in stack_map_alloc()
102 cost = n_buckets * sizeof(struct stack_map_bucket *) + sizeof(*smap); in stack_map_alloc()
108 smap->n_buckets = n_buckets; in stack_map_alloc()
232 id = hash & (smap->n_buckets - 1); in __bpf_get_stackid()
575 if (unlikely(id >= smap->n_buckets)) in bpf_stackmap_copy()
605 if (id >= smap->n_buckets || !smap->buckets[id]) in stack_map_get_next_key()
611 while (id < smap->n_buckets && !smap->buckets[id]) in stack_map_get_next_key()
[all …]
Dhashtab.c103 u32 n_buckets; /* number of hash buckets */ member
140 for (i = 0; i < htab->n_buckets; i++) { in htab_init_buckets()
155 hash = hash & min_t(u32, HASHTAB_MAP_LOCK_MASK, htab->n_buckets - 1); in htab_lock_bucket()
174 hash = hash & min_t(u32, HASHTAB_MAP_LOCK_MASK, htab->n_buckets - 1); in htab_unlock_bucket()
496 htab->n_buckets = roundup_pow_of_two(htab->map.max_entries); in htab_map_alloc()
507 if (htab->n_buckets == 0 || in htab_map_alloc()
508 htab->n_buckets > U32_MAX / sizeof(struct bucket)) in htab_map_alloc()
512 htab->buckets = bpf_map_area_alloc(htab->n_buckets * in htab_map_alloc()
607 return &htab->buckets[hash & (htab->n_buckets - 1)]; in __select_bucket()
635 u32 key_size, u32 n_buckets) in lookup_nulls_elem_raw() argument
[all …]
Ddevmap.c84 u32 n_buckets; member
108 return &dtab->dev_index_head[idx & (dtab->n_buckets - 1)]; in dev_map_index_hash()
134 dtab->n_buckets = roundup_pow_of_two(dtab->map.max_entries); in dev_map_init_map()
136 if (!dtab->n_buckets) /* Overflow check */ in dev_map_init_map()
141 dtab->dev_index_head = dev_map_create_hash(dtab->n_buckets, in dev_map_init_map()
209 for (i = 0; i < dtab->n_buckets; i++) { in dev_map_free()
307 i = idx & (dtab->n_buckets - 1); in dev_map_hash_get_next_key()
311 for (; i < dtab->n_buckets; i++) { in dev_map_hash_get_next_key()
624 for (i = 0; i < dtab->n_buckets; i++) { in dev_map_enqueue_multi()
743 for (i = 0; i < dtab->n_buckets; i++) { in dev_map_redirect_multi()
[all …]
/linux-6.1.9/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
Dpno.c400 int err, n_buckets; in brcmf_pno_config_sched_scans() local
403 n_buckets = brcmf_pno_prep_fwconfig(pi, &pno_cfg, &buckets, in brcmf_pno_config_sched_scans()
405 if (n_buckets < 0) in brcmf_pno_config_sched_scans()
406 return n_buckets; in brcmf_pno_config_sched_scans()
408 gsz = sizeof(*gscan_cfg) + (n_buckets - 1) * sizeof(*buckets); in brcmf_pno_config_sched_scans()
436 gscan_cfg->count_of_channel_buckets = n_buckets; in brcmf_pno_config_sched_scans()
438 n_buckets * sizeof(*buckets)); in brcmf_pno_config_sched_scans()
/linux-6.1.9/net/openvswitch/
Dflow_table.c169 ti->n_buckets = new_size; in table_instance_alloc()
484 for (i = 0; i < ti->n_buckets; i++) { in table_instance_flow_flush()
536 while (*bucket < ti->n_buckets) { in ovs_flow_tbl_dump_next()
557 return &ti->buckets[hash & (ti->n_buckets - 1)]; in find_bucket()
588 for (i = 0; i < old->n_buckets; i++) { in flow_table_copy_flows()
606 int n_buckets, bool ufid) in table_instance_rehash() argument
610 new_ti = table_instance_alloc(n_buckets); in table_instance_rehash()
954 return table_instance_rehash(ti, ti->n_buckets * 2, ufid); in table_instance_expand()
1048 if (table->count > ti->n_buckets) in flow_key_insert()
1051 new_ti = table_instance_rehash(ti, ti->n_buckets, false); in flow_key_insert()
[all …]
Dflow_table.h56 unsigned int n_buckets; member
/linux-6.1.9/net/core/
Dbpf_sk_storage.c749 u32 i, count, n_buckets; in bpf_sk_storage_map_seq_find_next() local
753 n_buckets = 1U << smap->bucket_log; in bpf_sk_storage_map_seq_find_next()
754 if (bucket_id >= n_buckets) in bpf_sk_storage_map_seq_find_next()
/linux-6.1.9/tools/testing/selftests/bpf/progs/
Dmap_ptr_kern.c94 __u32 n_buckets; member
114 VERIFY(hash->n_buckets == MAX_ENTRIES); in check_hash()