aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Josefsson <gandalf@wlug.westbo.se>2006-11-28 20:35:04 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:31:08 -0500
commite2b7606cdb602a4f69c02cfc8bebe9c63b595e24 (patch)
treeca56dcbad9b5d3ca8b1f5626e6587b5aa3d168e4
parent8f03dea52b1d0227656319e1b0822628b43791a8 (diff)
[NETFILTER]: More __read_mostly annotations
Place rarely written variables in the read-mostly section by using __read_mostly Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se> Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r--net/netfilter/core.c4
-rw-r--r--net/netfilter/nf_conntrack_core.c4
-rw-r--r--net/netfilter/nf_conntrack_helper.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 17f9e1cbc73b..291b8c6862f1 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -28,7 +28,7 @@
28 28
29static DEFINE_SPINLOCK(afinfo_lock); 29static DEFINE_SPINLOCK(afinfo_lock);
30 30
31struct nf_afinfo *nf_afinfo[NPROTO]; 31struct nf_afinfo *nf_afinfo[NPROTO] __read_mostly;
32EXPORT_SYMBOL(nf_afinfo); 32EXPORT_SYMBOL(nf_afinfo);
33 33
34int nf_register_afinfo(struct nf_afinfo *afinfo) 34int nf_register_afinfo(struct nf_afinfo *afinfo)
@@ -54,7 +54,7 @@ EXPORT_SYMBOL_GPL(nf_unregister_afinfo);
54 * of skbuffs queued for userspace, and not deregister a hook unless 54 * of skbuffs queued for userspace, and not deregister a hook unless
55 * this is zero, but that sucks. Now, we simply check when the 55 * this is zero, but that sucks. Now, we simply check when the
56 * packets come back: if the hook is gone, the packet is discarded. */ 56 * packets come back: if the hook is gone, the packet is discarded. */
57struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS]; 57struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS] __read_mostly;
58EXPORT_SYMBOL(nf_hooks); 58EXPORT_SYMBOL(nf_hooks);
59static DEFINE_SPINLOCK(nf_hook_lock); 59static DEFINE_SPINLOCK(nf_hook_lock);
60 60
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 09c0e6311044..6607ed415861 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -73,10 +73,10 @@ DEFINE_RWLOCK(nf_conntrack_lock);
73atomic_t nf_conntrack_count = ATOMIC_INIT(0); 73atomic_t nf_conntrack_count = ATOMIC_INIT(0);
74 74
75void (*nf_conntrack_destroyed)(struct nf_conn *conntrack) = NULL; 75void (*nf_conntrack_destroyed)(struct nf_conn *conntrack) = NULL;
76unsigned int nf_conntrack_htable_size __read_mostly = 0; 76unsigned int nf_conntrack_htable_size __read_mostly;
77int nf_conntrack_max __read_mostly; 77int nf_conntrack_max __read_mostly;
78struct list_head *nf_conntrack_hash __read_mostly; 78struct list_head *nf_conntrack_hash __read_mostly;
79struct nf_conn nf_conntrack_untracked; 79struct nf_conn nf_conntrack_untracked __read_mostly;
80unsigned int nf_ct_log_invalid __read_mostly; 80unsigned int nf_ct_log_invalid __read_mostly;
81LIST_HEAD(unconfirmed); 81LIST_HEAD(unconfirmed);
82static int nf_conntrack_vmalloc __read_mostly; 82static int nf_conntrack_vmalloc __read_mostly;
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
index ca044875a561..2af92204722b 100644
--- a/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -30,7 +30,7 @@
30#include <net/netfilter/nf_conntrack_helper.h> 30#include <net/netfilter/nf_conntrack_helper.h>
31#include <net/netfilter/nf_conntrack_core.h> 31#include <net/netfilter/nf_conntrack_core.h>
32 32
33static LIST_HEAD(helpers); 33static __read_mostly LIST_HEAD(helpers);
34 34
35struct nf_conntrack_helper * 35struct nf_conntrack_helper *
36__nf_ct_helper_find(const struct nf_conntrack_tuple *tuple) 36__nf_ct_helper_find(const struct nf_conntrack_tuple *tuple)