Lines Matching refs:f
102 int inet_frags_init(struct inet_frags *f) in inet_frags_init() argument
104 f->frags_cachep = kmem_cache_create(f->frags_cache_name, f->qsize, 0, 0, in inet_frags_init()
106 if (!f->frags_cachep) in inet_frags_init()
109 refcount_set(&f->refcnt, 1); in inet_frags_init()
110 init_completion(&f->completion); in inet_frags_init()
115 void inet_frags_fini(struct inet_frags *f) in inet_frags_fini() argument
117 if (refcount_dec_and_test(&f->refcnt)) in inet_frags_fini()
118 complete(&f->completion); in inet_frags_fini()
120 wait_for_completion(&f->completion); in inet_frags_fini()
122 kmem_cache_destroy(f->frags_cachep); in inet_frags_fini()
123 f->frags_cachep = NULL; in inet_frags_fini()
151 struct inet_frags *f = fqdir->f; in fqdir_work_fn() local
161 if (refcount_dec_and_test(&f->refcnt)) in fqdir_work_fn()
162 complete(&f->completion); in fqdir_work_fn()
167 int fqdir_init(struct fqdir **fqdirp, struct inet_frags *f, struct net *net) in fqdir_init() argument
174 fqdir->f = f; in fqdir_init()
176 res = rhashtable_init(&fqdir->rhashtable, &fqdir->f->rhash_params); in fqdir_init()
181 refcount_inc(&f->refcnt); in fqdir_init()
211 fqdir->f->rhash_params); in inet_frag_kill()
225 struct inet_frags *f = q->fqdir->f; in inet_frag_destroy_rcu() local
227 if (f->destructor) in inet_frag_destroy_rcu()
228 f->destructor(q); in inet_frag_destroy_rcu()
229 kmem_cache_free(f->frags_cachep, q); in inet_frag_destroy_rcu()
258 struct inet_frags *f; in inet_frag_destroy() local
265 f = fqdir->f; in inet_frag_destroy()
267 sum = sum_truesize + f->qsize; in inet_frag_destroy()
276 struct inet_frags *f, in inet_frag_alloc() argument
281 q = kmem_cache_zalloc(f->frags_cachep, GFP_ATOMIC); in inet_frag_alloc()
286 f->constructor(q, arg); in inet_frag_alloc()
287 add_frag_mem_limit(fqdir, f->qsize); in inet_frag_alloc()
289 timer_setup(&q->timer, f->frag_expire, 0); in inet_frag_alloc()
300 struct inet_frags *f = fqdir->f; in inet_frag_create() local
303 q = inet_frag_alloc(fqdir, f, arg); in inet_frag_create()
311 &q->node, f->rhash_params); in inet_frag_create()
331 prev = rhashtable_lookup(&fqdir->rhashtable, key, fqdir->f->rhash_params); in inet_frag_find()