[NETFILTER]: nf_nat: sprinkle a few __read_mostlys
authorPatrick McHardy <kaber@trash.net>
Tue, 18 Dec 2007 06:37:52 +0000 (22:37 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:58:57 +0000 (14:58 -0800)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/nf_nat_core.c

index a772445228ac0e8a01e552800a128a83dd325430..7cc179cfc7c11b3277c3fa86aaee6bf492fd19a1 100644 (file)
 
 static DEFINE_RWLOCK(nf_nat_lock);
 
-static struct nf_conntrack_l3proto *l3proto = NULL;
+static struct nf_conntrack_l3proto *l3proto __read_mostly;
 
 /* Calculated at init based on memory size */
-static unsigned int nf_nat_htable_size;
+static unsigned int nf_nat_htable_size __read_mostly;
 static int nf_nat_vmalloced;
 
-static struct hlist_head *bysource;
+static struct hlist_head *bysource __read_mostly;
 
 #define MAX_IP_NAT_PROTO 256
-static const struct nf_nat_protocol *nf_nat_protos[MAX_IP_NAT_PROTO];
+static const struct nf_nat_protocol *nf_nat_protos[MAX_IP_NAT_PROTO]
+                                               __read_mostly;
 
 static inline const struct nf_nat_protocol *
 __nf_nat_proto_find(u_int8_t protonum)