Lines Matching refs:f
105 int inet_frags_init(struct inet_frags *f) in inet_frags_init() argument
107 f->frags_cachep = kmem_cache_create(f->frags_cache_name, f->qsize, 0, 0, in inet_frags_init()
109 if (!f->frags_cachep) in inet_frags_init()
112 refcount_set(&f->refcnt, 1); in inet_frags_init()
113 init_completion(&f->completion); in inet_frags_init()
118 void inet_frags_fini(struct inet_frags *f) in inet_frags_fini() argument
120 if (refcount_dec_and_test(&f->refcnt)) in inet_frags_fini()
121 complete(&f->completion); in inet_frags_fini()
123 wait_for_completion(&f->completion); in inet_frags_fini()
125 kmem_cache_destroy(f->frags_cachep); in inet_frags_fini()
126 f->frags_cachep = NULL; in inet_frags_fini()
157 struct inet_frags *f; in fqdir_free_fn() local
169 f = fqdir->f; in fqdir_free_fn()
170 if (refcount_dec_and_test(&f->refcnt)) in fqdir_free_fn()
171 complete(&f->completion); in fqdir_free_fn()
189 int fqdir_init(struct fqdir **fqdirp, struct inet_frags *f, struct net *net) in fqdir_init() argument
196 fqdir->f = f; in fqdir_init()
198 res = rhashtable_init(&fqdir->rhashtable, &fqdir->f->rhash_params); in fqdir_init()
203 refcount_inc(&f->refcnt); in fqdir_init()
245 fqdir->f->rhash_params); in inet_frag_kill()
259 struct inet_frags *f = q->fqdir->f; in inet_frag_destroy_rcu() local
261 if (f->destructor) in inet_frag_destroy_rcu()
262 f->destructor(q); in inet_frag_destroy_rcu()
263 kmem_cache_free(f->frags_cachep, q); in inet_frag_destroy_rcu()
293 struct inet_frags *f; in inet_frag_destroy() local
304 f = fqdir->f; in inet_frag_destroy()
306 sum = sum_truesize + f->qsize; in inet_frag_destroy()
315 struct inet_frags *f, in inet_frag_alloc() argument
320 q = kmem_cache_zalloc(f->frags_cachep, GFP_ATOMIC); in inet_frag_alloc()
325 f->constructor(q, arg); in inet_frag_alloc()
326 add_frag_mem_limit(fqdir, f->qsize); in inet_frag_alloc()
328 timer_setup(&q->timer, f->frag_expire, 0); in inet_frag_alloc()
340 struct inet_frags *f = fqdir->f; in inet_frag_create() local
343 q = inet_frag_alloc(fqdir, f, arg); in inet_frag_create()
351 &q->node, f->rhash_params); in inet_frag_create()
376 prev = rhashtable_lookup(&fqdir->rhashtable, key, fqdir->f->rhash_params); in inet_frag_find()