Lines Matching refs:net
34 struct net *net; member
192 flow_cache_lookup(struct net *net, const struct flowi *key, u16 family, u8 dir, in flow_cache_lookup() argument
195 struct flow_cache *fc = &net->xfrm.flow_cache_global; in flow_cache_lookup()
222 if (tfle->net == net && in flow_cache_lookup()
237 fle->net = net; in flow_cache_lookup()
245 } else if (likely(fle->genid == atomic_read(&net->xfrm.flow_cache_genid))) { in flow_cache_lookup()
264 flo = resolver(net, key, family, dir, flo, ctx); in flow_cache_lookup()
266 fle->genid = atomic_read(&net->xfrm.flow_cache_genid); in flow_cache_lookup()
340 void flow_cache_flush(struct net *net) in flow_cache_flush() argument
353 mutex_lock(&net->xfrm.flow_flush_sem); in flow_cache_flush()
354 info.cache = &net->xfrm.flow_cache_global; in flow_cache_flush()
374 mutex_unlock(&net->xfrm.flow_flush_sem); in flow_cache_flush()
383 struct net *net = container_of(xfrm, struct net, xfrm); in flow_cache_flush_task() local
385 flow_cache_flush(net); in flow_cache_flush_task()
388 void flow_cache_flush_deferred(struct net *net) in flow_cache_flush_deferred() argument
390 schedule_work(&net->xfrm.flow_cache_flush_work); in flow_cache_flush_deferred()
435 int flow_cache_init(struct net *net) in flow_cache_init() argument
438 struct flow_cache *fc = &net->xfrm.flow_cache_global; in flow_cache_init()
444 spin_lock_init(&net->xfrm.flow_cache_gc_lock); in flow_cache_init()
445 INIT_LIST_HEAD(&net->xfrm.flow_cache_gc_list); in flow_cache_init()
446 INIT_WORK(&net->xfrm.flow_cache_gc_work, flow_cache_gc_task); in flow_cache_init()
447 INIT_WORK(&net->xfrm.flow_cache_flush_work, flow_cache_flush_task); in flow_cache_init()
448 mutex_init(&net->xfrm.flow_flush_sem); in flow_cache_init()
494 void flow_cache_fini(struct net *net) in flow_cache_fini() argument
497 struct flow_cache *fc = &net->xfrm.flow_cache_global; in flow_cache_fini()