diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-15 12:38:52 -0500 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2010-11-15 18:13:08 -0500 |
commit | 4ecd29447e6b9c12190e21c3e44ed5b12693c467 (patch) | |
tree | c7bad7ff7f913e634ccae14e1c67f7687419f330 | |
parent | 8aadf93c9c1ff1a53aafd18d038be0d709b5ebc0 (diff) |
ipvs: add static and read_mostly attributes
ip_vs_conn_tab_bits & ip_vs_conn_tab_mask are static to
ipvs/ip_vs_conn.c
ip_vs_conn_tab_size, ip_vs_conn_tab_mask, ip_vs_conn_tab [the pointer],
ip_vs_conn_rnd are mostly read.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | net/netfilter/ipvs/ip_vs_conn.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index 261db1a17633..7615f9e3d955 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c | |||
@@ -48,18 +48,18 @@ | |||
48 | /* | 48 | /* |
49 | * Connection hash size. Default is what was selected at compile time. | 49 | * Connection hash size. Default is what was selected at compile time. |
50 | */ | 50 | */ |
51 | int ip_vs_conn_tab_bits = CONFIG_IP_VS_TAB_BITS; | 51 | static int ip_vs_conn_tab_bits = CONFIG_IP_VS_TAB_BITS; |
52 | module_param_named(conn_tab_bits, ip_vs_conn_tab_bits, int, 0444); | 52 | module_param_named(conn_tab_bits, ip_vs_conn_tab_bits, int, 0444); |
53 | MODULE_PARM_DESC(conn_tab_bits, "Set connections' hash size"); | 53 | MODULE_PARM_DESC(conn_tab_bits, "Set connections' hash size"); |
54 | 54 | ||
55 | /* size and mask values */ | 55 | /* size and mask values */ |
56 | int ip_vs_conn_tab_size; | 56 | int ip_vs_conn_tab_size __read_mostly; |
57 | int ip_vs_conn_tab_mask; | 57 | static int ip_vs_conn_tab_mask __read_mostly; |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Connection hash table: for input and output packets lookups of IPVS | 60 | * Connection hash table: for input and output packets lookups of IPVS |
61 | */ | 61 | */ |
62 | static struct list_head *ip_vs_conn_tab; | 62 | static struct list_head *ip_vs_conn_tab __read_mostly; |
63 | 63 | ||
64 | /* SLAB cache for IPVS connections */ | 64 | /* SLAB cache for IPVS connections */ |
65 | static struct kmem_cache *ip_vs_conn_cachep __read_mostly; | 65 | static struct kmem_cache *ip_vs_conn_cachep __read_mostly; |
@@ -71,7 +71,7 @@ static atomic_t ip_vs_conn_count = ATOMIC_INIT(0); | |||
71 | static atomic_t ip_vs_conn_no_cport_cnt = ATOMIC_INIT(0); | 71 | static atomic_t ip_vs_conn_no_cport_cnt = ATOMIC_INIT(0); |
72 | 72 | ||
73 | /* random value for IPVS connection hash */ | 73 | /* random value for IPVS connection hash */ |
74 | static unsigned int ip_vs_conn_rnd; | 74 | static unsigned int ip_vs_conn_rnd __read_mostly; |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * Fine locking granularity for big connection hash table | 77 | * Fine locking granularity for big connection hash table |