Lines Matching refs:nf
74 void inet_frags_init_net(struct netns_frags *nf) in inet_frags_init_net() argument
76 nf->nqueues = 0; in inet_frags_init_net()
77 atomic_set(&nf->mem, 0); in inet_frags_init_net()
78 INIT_LIST_HEAD(&nf->lru_list); in inet_frags_init_net()
88 void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f) in inet_frags_exit_net() argument
90 nf->low_thresh = 0; in inet_frags_exit_net()
93 inet_frag_evictor(nf, f); in inet_frags_exit_net()
120 static inline void frag_kfree_skb(struct netns_frags *nf, struct inet_frags *f, in frag_kfree_skb() argument
126 atomic_sub(skb->truesize, &nf->mem); in frag_kfree_skb()
136 struct netns_frags *nf; in inet_frag_destroy() local
143 nf = q->net; in inet_frag_destroy()
147 frag_kfree_skb(nf, f, fp, work); in inet_frag_destroy()
153 atomic_sub(f->qsize, &nf->mem); in inet_frag_destroy()
162 int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f) in inet_frag_evictor() argument
167 work = atomic_read(&nf->mem) - nf->low_thresh; in inet_frag_evictor()
170 if (list_empty(&nf->lru_list)) { in inet_frag_evictor()
175 q = list_first_entry(&nf->lru_list, in inet_frag_evictor()
194 static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf, in inet_frag_intern() argument
217 if (qp->net == nf && f->match(qp, arg)) { in inet_frag_intern()
227 if (!mod_timer(&qp->timer, jiffies + nf->timeout)) in inet_frag_intern()
232 list_add_tail(&qp->lru_list, &nf->lru_list); in inet_frag_intern()
233 nf->nqueues++; in inet_frag_intern()
238 static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf, in inet_frag_alloc() argument
248 atomic_add(f->qsize, &nf->mem); in inet_frag_alloc()
252 q->net = nf; in inet_frag_alloc()
257 static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf, in inet_frag_create() argument
262 q = inet_frag_alloc(nf, f, arg); in inet_frag_create()
266 return inet_frag_intern(nf, q, f, arg); in inet_frag_create()
269 struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, in inet_frag_find() argument
278 if (q->net == nf && f->match(q, key)) { in inet_frag_find()
288 return inet_frag_create(nf, f, key); in inet_frag_find()