Searched refs:n_buckets (Results 1 – 6 of 6) sorted by relevance
/Linux-v5.4/kernel/bpf/ |
D | stackmap.c | 29 u32 n_buckets; member 90 u64 cost, n_buckets; in stack_map_alloc() local 114 n_buckets = roundup_pow_of_two(attr->max_entries); in stack_map_alloc() 116 cost = n_buckets * sizeof(struct stack_map_bucket *) + sizeof(*smap); in stack_map_alloc() 117 cost += n_buckets * (value_size + sizeof(struct stack_map_bucket)); in stack_map_alloc() 130 smap->n_buckets = n_buckets; in stack_map_alloc() 385 id = hash & (smap->n_buckets - 1); in BPF_CALL_3() 525 if (unlikely(id >= smap->n_buckets)) in bpf_stackmap_copy() 555 if (id >= smap->n_buckets || !smap->buckets[id]) in stack_map_get_next_key() 561 while (id < smap->n_buckets && !smap->buckets[id]) in stack_map_get_next_key() [all …]
|
D | hashtab.c | 35 u32 n_buckets; /* number of hash buckets */ member 331 htab->n_buckets = roundup_pow_of_two(htab->map.max_entries); in htab_map_alloc() 342 if (htab->n_buckets == 0 || in htab_map_alloc() 343 htab->n_buckets > U32_MAX / sizeof(struct bucket)) in htab_map_alloc() 346 cost = (u64) htab->n_buckets * sizeof(struct bucket) + in htab_map_alloc() 361 htab->buckets = bpf_map_area_alloc(htab->n_buckets * in htab_map_alloc() 372 for (i = 0; i < htab->n_buckets; i++) { in htab_map_alloc() 412 return &htab->buckets[hash & (htab->n_buckets - 1)]; in __select_bucket() 440 u32 key_size, u32 n_buckets) in lookup_nulls_elem_raw() argument 450 if (unlikely(get_nulls_value(n) != (hash & (n_buckets - 1)))) in lookup_nulls_elem_raw() [all …]
|
D | devmap.c | 85 u32 n_buckets; member 127 dtab->n_buckets = roundup_pow_of_two(dtab->map.max_entries); in dev_map_init_map() 129 if (!dtab->n_buckets) /* Overflow check */ in dev_map_init_map() 131 cost += (u64) sizeof(struct hlist_head) * dtab->n_buckets; in dev_map_init_map() 153 dtab->dev_index_head = dev_map_create_hash(dtab->n_buckets); in dev_map_init_map() 269 return &dtab->dev_index_head[idx & (dtab->n_buckets - 1)]; in dev_map_index_hash() 311 i = idx & (dtab->n_buckets - 1); in dev_map_hash_get_next_key() 315 for (; i < dtab->n_buckets; i++) { in dev_map_hash_get_next_key() 729 for (i = 0; i < dtab->n_buckets; i++) { in dev_map_hash_remove_netdev()
|
/Linux-v5.4/net/openvswitch/ |
D | flow_table.c | 159 ti->n_buckets = new_size; in table_instance_alloc() 213 for (i = 0; i < ti->n_buckets; i++) { in table_instance_destroy() 258 while (*bucket < ti->n_buckets) { in ovs_flow_tbl_dump_next() 279 return &ti->buckets[hash & (ti->n_buckets - 1)]; in find_bucket() 310 for (i = 0; i < old->n_buckets; i++) { in flow_table_copy_flows() 328 int n_buckets, bool ufid) in table_instance_rehash() argument 332 new_ti = table_instance_alloc(n_buckets); in table_instance_rehash() 543 return table_instance_rehash(ti, ti->n_buckets * 2, ufid); in table_instance_expand() 656 if (table->count > ti->n_buckets) in flow_key_insert() 659 new_ti = table_instance_rehash(ti, ti->n_buckets, false); in flow_key_insert() [all …]
|
D | flow_table.h | 27 unsigned int n_buckets; member
|
/Linux-v5.4/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
D | pno.c | 396 int err, n_buckets; in brcmf_pno_config_sched_scans() local 399 n_buckets = brcmf_pno_prep_fwconfig(pi, &pno_cfg, &buckets, in brcmf_pno_config_sched_scans() 401 if (n_buckets < 0) in brcmf_pno_config_sched_scans() 402 return n_buckets; in brcmf_pno_config_sched_scans() 404 gsz = sizeof(*gscan_cfg) + (n_buckets - 1) * sizeof(*buckets); in brcmf_pno_config_sched_scans() 432 gscan_cfg->count_of_channel_buckets = n_buckets; in brcmf_pno_config_sched_scans() 434 n_buckets * sizeof(*buckets)); in brcmf_pno_config_sched_scans()
|