diff options
Diffstat (limited to 'net/core/flow.c')
-rw-r--r-- | net/core/flow.c | 9 |
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 | ||
64 | atomic_t flow_cache_genid = ATOMIC_INIT(0); | 64 | atomic_t flow_cache_genid = ATOMIC_INIT(0); |
65 | EXPORT_SYMBOL(flow_cache_genid); | ||
65 | static struct flow_cache flow_cache_global; | 66 | static struct flow_cache flow_cache_global; |
66 | static struct kmem_cache *flow_cachep; | 67 | static 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 | } |
295 | EXPORT_SYMBOL(flow_cache_lookup); | ||
294 | 296 | ||
295 | static void flow_cache_flush_tasklet(unsigned long data) | 297 | static 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 | ||
426 | module_init(flow_cache_init_global); | 428 | module_init(flow_cache_init_global); |
427 | |||
428 | EXPORT_SYMBOL(flow_cache_genid); | ||
429 | EXPORT_SYMBOL(flow_cache_lookup); | ||