Lines Matching refs:fcp

99 static void flow_cache_queue_garbage(struct flow_cache_percpu *fcp,
104 fcp->hash_count -= deleted;
113 struct flow_cache_percpu *fcp,
127 &fcp->hash_table[i], u.hlist) {
139 flow_cache_queue_garbage(fcp, deleted, &gc_list, xfrm);
143 struct flow_cache_percpu *fcp)
147 __flow_cache_shrink(fc, fcp, shrink_to);
151 struct flow_cache_percpu *fcp)
153 get_random_bytes(&fcp->hash_rnd, sizeof(u32));
154 fcp->hash_rnd_recalc = 0;
155 __flow_cache_shrink(fc, fcp, 0);
159 struct flow_cache_percpu *fcp,
166 return jhash2(k, length, fcp->hash_rnd)
196 struct flow_cache_percpu *fcp;
203 fcp = this_cpu_ptr(fc->percpu);
214 if (!fcp->hash_table)
217 if (fcp->hash_rnd_recalc)
218 flow_new_hash_rnd(fc, fcp);
220 hash = flow_hash_code(fc, fcp, key, keysize);
221 hlist_for_each_entry(tfle, &fcp->hash_table[hash], u.hlist) {
232 if (fcp->hash_count > fc->high_watermark)
233 flow_cache_shrink(fc, fcp);
242 hlist_add_head(&fle->u.hlist, &fcp->hash_table[hash]);
243 fcp->hash_count++;
285 struct flow_cache_percpu *fcp;
293 fcp = this_cpu_ptr(fc->percpu);
296 &fcp->hash_table[i], u.hlist) {
306 flow_cache_queue_garbage(fcp, deleted, &gc_list, xfrm);
320 struct flow_cache_percpu *fcp;
323 fcp = per_cpu_ptr(fc->percpu, cpu);
325 if (!hlist_empty(&fcp->hash_table[i]))
395 struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, cpu);
398 if (!fcp->hash_table) {
399 fcp->hash_table = kzalloc_node(sz, GFP_KERNEL, cpu_to_node(cpu));
400 if (!fcp->hash_table) {
404 fcp->hash_rnd_recalc = 1;
405 fcp->hash_count = 0;
406 tasklet_init(&fcp->flush_tasklet, flow_cache_flush_tasklet, 0);
418 struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, cpu);
429 __flow_cache_shrink(fc, fcp, 0);
480 struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, i);
481 kfree(fcp->hash_table);
482 fcp->hash_table = NULL;
503 struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, i);
504 kfree(fcp->hash_table);
505 fcp->hash_table = NULL;