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