Home
last modified time | relevance | path

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

/linux-4.1.27/kernel/bpf/
Dhashtab.c22 u32 n_buckets; /* number of hash buckets */ member
58 htab->n_buckets = roundup_pow_of_two(htab->map.max_entries); in htab_map_alloc()
69 if (htab->n_buckets == 0 || in htab_map_alloc()
70 htab->n_buckets > U32_MAX / sizeof(struct hlist_head)) in htab_map_alloc()
73 htab->buckets = kmalloc_array(htab->n_buckets, sizeof(struct hlist_head), in htab_map_alloc()
77 htab->buckets = vmalloc(htab->n_buckets * sizeof(struct hlist_head)); in htab_map_alloc()
82 for (i = 0; i < htab->n_buckets; i++) in htab_map_alloc()
105 return &htab->buckets[hash & (htab->n_buckets - 1)]; in select_bucket()
181 i = hash & (htab->n_buckets - 1); in htab_map_get_next_key()
186 for (; i < htab->n_buckets; i++) { in htab_map_get_next_key()
[all …]
/linux-4.1.27/net/openvswitch/
Dflow_table.c119 static struct flex_array *alloc_buckets(unsigned int n_buckets) in alloc_buckets() argument
125 n_buckets, GFP_KERNEL); in alloc_buckets()
129 err = flex_array_prealloc(buckets, 0, n_buckets, GFP_KERNEL); in alloc_buckets()
135 for (i = 0; i < n_buckets; i++) in alloc_buckets()
199 ti->n_buckets = new_size; in table_instance_alloc()
253 for (i = 0; i < ti->n_buckets; i++) { in table_instance_destroy()
298 while (*bucket < ti->n_buckets) { in ovs_flow_tbl_dump_next()
320 (hash & (ti->n_buckets - 1))); in find_bucket()
351 for (i = 0; i < old->n_buckets; i++) { in flow_table_copy_flows()
371 int n_buckets, bool ufid) in table_instance_rehash() argument
[all …]
Dflow_table.h41 unsigned int n_buckets; member