Home
last modified time | relevance | path

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

/linux-4.4.14/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()
81 if (htab->n_buckets == 0 || in htab_map_alloc()
82 htab->n_buckets > U32_MAX / sizeof(struct hlist_head)) in htab_map_alloc()
85 if ((u64) htab->n_buckets * sizeof(struct hlist_head) + in htab_map_alloc()
91 htab->map.pages = round_up(htab->n_buckets * sizeof(struct hlist_head) + in htab_map_alloc()
96 htab->buckets = kmalloc_array(htab->n_buckets, sizeof(struct hlist_head), in htab_map_alloc()
100 htab->buckets = vmalloc(htab->n_buckets * sizeof(struct hlist_head)); in htab_map_alloc()
105 for (i = 0; i < htab->n_buckets; i++) in htab_map_alloc()
125 return &htab->buckets[hash & (htab->n_buckets - 1)]; in select_bucket()
[all …]
/linux-4.4.14/net/openvswitch/
Dflow_table.c120 static struct flex_array *alloc_buckets(unsigned int n_buckets) in alloc_buckets() argument
126 n_buckets, GFP_KERNEL); in alloc_buckets()
130 err = flex_array_prealloc(buckets, 0, n_buckets, GFP_KERNEL); in alloc_buckets()
136 for (i = 0; i < n_buckets; i++) in alloc_buckets()
201 ti->n_buckets = new_size; in table_instance_alloc()
255 for (i = 0; i < ti->n_buckets; i++) { in table_instance_destroy()
300 while (*bucket < ti->n_buckets) { in ovs_flow_tbl_dump_next()
322 (hash & (ti->n_buckets - 1))); in find_bucket()
353 for (i = 0; i < old->n_buckets; i++) { in flow_table_copy_flows()
373 int n_buckets, bool ufid) in table_instance_rehash() argument
[all …]
Dflow_table.h41 unsigned int n_buckets; member