aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/flow.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/flow.c')
-rw-r--r--net/core/flow.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/core/flow.c b/net/core/flow.c
index 16190067400..f67dcbfe54e 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -62,6 +62,7 @@ struct flow_cache {
62}; 62};
63 63
64atomic_t flow_cache_genid = ATOMIC_INIT(0); 64atomic_t flow_cache_genid = ATOMIC_INIT(0);
65EXPORT_SYMBOL(flow_cache_genid);
65static struct flow_cache flow_cache_global; 66static struct flow_cache flow_cache_global;
66static struct kmem_cache *flow_cachep; 67static struct kmem_cache *flow_cachep;
67 68
@@ -222,7 +223,7 @@ flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
222 unsigned int hash; 223 unsigned int hash;
223 224
224 local_bh_disable(); 225 local_bh_disable();
225 fcp = per_cpu_ptr(fc->percpu, smp_processor_id()); 226 fcp = this_cpu_ptr(fc->percpu);
226 227
227 fle = NULL; 228 fle = NULL;
228 flo = NULL; 229 flo = NULL;
@@ -291,6 +292,7 @@ ret_object:
291 local_bh_enable(); 292 local_bh_enable();
292 return flo; 293 return flo;
293} 294}
295EXPORT_SYMBOL(flow_cache_lookup);
294 296
295static void flow_cache_flush_tasklet(unsigned long data) 297static void flow_cache_flush_tasklet(unsigned long data)
296{ 298{
@@ -302,7 +304,7 @@ static void flow_cache_flush_tasklet(unsigned long data)
302 LIST_HEAD(gc_list); 304 LIST_HEAD(gc_list);
303 int i, deleted = 0; 305 int i, deleted = 0;
304 306
305 fcp = per_cpu_ptr(fc->percpu, smp_processor_id()); 307 fcp = this_cpu_ptr(fc->percpu);
306 for (i = 0; i < flow_cache_hash_size(fc); i++) { 308 for (i = 0; i < flow_cache_hash_size(fc); i++) {
307 hlist_for_each_entry_safe(fle, entry, tmp, 309 hlist_for_each_entry_safe(fle, entry, tmp,
308 &fcp->hash_table[i], u.hlist) { 310 &fcp->hash_table[i], u.hlist) {
@@ -424,6 +426,3 @@ static int __init flow_cache_init_global(void)
424} 426}
425 427
426module_init(flow_cache_init_global); 428module_init(flow_cache_init_global);
427
428EXPORT_SYMBOL(flow_cache_genid);
429EXPORT_SYMBOL(flow_cache_lookup);