diff options
| author | Brian Haley <brian.haley@hp.com> | 2006-09-20 15:03:46 -0400 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:19:58 -0400 |
| commit | 1192e403e9ea2dc23bbbe2b4fe9bdbc47e8c6056 (patch) | |
| tree | 5554ab529123500558637dc39cf14247e02a41cc | |
| parent | c1fe3ca5106d9568791433fa6c7f27e71ac69e1b (diff) | |
[NETFILTER]: make some netfilter globals __read_mostly
Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/ipv4/netfilter/ip_conntrack_core.c | 6 | ||||
| -rw-r--r-- | net/ipv4/netfilter/ip_queue.c | 8 | ||||
| -rw-r--r-- | net/ipv6/netfilter/ip6_queue.c | 8 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_core.c | 10 |
4 files changed, 16 insertions, 16 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index 422a662194c..2b6f24fc727 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c | |||
| @@ -63,17 +63,17 @@ atomic_t ip_conntrack_count = ATOMIC_INIT(0); | |||
| 63 | 63 | ||
| 64 | void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack) = NULL; | 64 | void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack) = NULL; |
| 65 | LIST_HEAD(ip_conntrack_expect_list); | 65 | LIST_HEAD(ip_conntrack_expect_list); |
| 66 | struct ip_conntrack_protocol *ip_ct_protos[MAX_IP_CT_PROTO]; | 66 | struct ip_conntrack_protocol *ip_ct_protos[MAX_IP_CT_PROTO] __read_mostly; |
| 67 | static LIST_HEAD(helpers); | 67 | static LIST_HEAD(helpers); |
| 68 | unsigned int ip_conntrack_htable_size __read_mostly = 0; | 68 | unsigned int ip_conntrack_htable_size __read_mostly = 0; |
| 69 | int ip_conntrack_max __read_mostly; | 69 | int ip_conntrack_max __read_mostly; |
| 70 | struct list_head *ip_conntrack_hash; | 70 | struct list_head *ip_conntrack_hash __read_mostly; |
| 71 | static kmem_cache_t *ip_conntrack_cachep __read_mostly; | 71 | static kmem_cache_t *ip_conntrack_cachep __read_mostly; |
| 72 | static kmem_cache_t *ip_conntrack_expect_cachep __read_mostly; | 72 | static kmem_cache_t *ip_conntrack_expect_cachep __read_mostly; |
| 73 | struct ip_conntrack ip_conntrack_untracked; | 73 | struct ip_conntrack ip_conntrack_untracked; |
| 74 | unsigned int ip_ct_log_invalid __read_mostly; | 74 | unsigned int ip_ct_log_invalid __read_mostly; |
| 75 | static LIST_HEAD(unconfirmed); | 75 | static LIST_HEAD(unconfirmed); |
| 76 | static int ip_conntrack_vmalloc; | 76 | static int ip_conntrack_vmalloc __read_mostly; |
| 77 | 77 | ||
| 78 | static unsigned int ip_conntrack_next_id; | 78 | static unsigned int ip_conntrack_next_id; |
| 79 | static unsigned int ip_conntrack_expect_next_id; | 79 | static unsigned int ip_conntrack_expect_next_id; |
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 80060cbe4a0..7edad790478 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
| @@ -52,15 +52,15 @@ struct ipq_queue_entry { | |||
| 52 | 52 | ||
| 53 | typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long); | 53 | typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long); |
| 54 | 54 | ||
| 55 | static unsigned char copy_mode = IPQ_COPY_NONE; | 55 | static unsigned char copy_mode __read_mostly = IPQ_COPY_NONE; |
| 56 | static unsigned int queue_maxlen __read_mostly = IPQ_QMAX_DEFAULT; | 56 | static unsigned int queue_maxlen __read_mostly = IPQ_QMAX_DEFAULT; |
| 57 | static DEFINE_RWLOCK(queue_lock); | 57 | static DEFINE_RWLOCK(queue_lock); |
| 58 | static int peer_pid; | 58 | static int peer_pid __read_mostly; |
| 59 | static unsigned int copy_range; | 59 | static unsigned int copy_range __read_mostly; |
| 60 | static unsigned int queue_total; | 60 | static unsigned int queue_total; |
| 61 | static unsigned int queue_dropped = 0; | 61 | static unsigned int queue_dropped = 0; |
| 62 | static unsigned int queue_user_dropped = 0; | 62 | static unsigned int queue_user_dropped = 0; |
| 63 | static struct sock *ipqnl; | 63 | static struct sock *ipqnl __read_mostly; |
| 64 | static LIST_HEAD(queue_list); | 64 | static LIST_HEAD(queue_list); |
| 65 | static DEFINE_MUTEX(ipqnl_mutex); | 65 | static DEFINE_MUTEX(ipqnl_mutex); |
| 66 | 66 | ||
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index d322e839579..9510c24ca8d 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c | |||
| @@ -56,15 +56,15 @@ struct ipq_queue_entry { | |||
| 56 | 56 | ||
| 57 | typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long); | 57 | typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long); |
| 58 | 58 | ||
| 59 | static unsigned char copy_mode = IPQ_COPY_NONE; | 59 | static unsigned char copy_mode __read_mostly = IPQ_COPY_NONE; |
| 60 | static unsigned int queue_maxlen __read_mostly = IPQ_QMAX_DEFAULT; | 60 | static unsigned int queue_maxlen __read_mostly = IPQ_QMAX_DEFAULT; |
| 61 | static DEFINE_RWLOCK(queue_lock); | 61 | static DEFINE_RWLOCK(queue_lock); |
| 62 | static int peer_pid; | 62 | static int peer_pid __read_mostly; |
| 63 | static unsigned int copy_range; | 63 | static unsigned int copy_range __read_mostly; |
| 64 | static unsigned int queue_total; | 64 | static unsigned int queue_total; |
| 65 | static unsigned int queue_dropped = 0; | 65 | static unsigned int queue_dropped = 0; |
| 66 | static unsigned int queue_user_dropped = 0; | 66 | static unsigned int queue_user_dropped = 0; |
| 67 | static struct sock *ipqnl; | 67 | static struct sock *ipqnl __read_mostly; |
| 68 | static LIST_HEAD(queue_list); | 68 | static LIST_HEAD(queue_list); |
| 69 | static DEFINE_MUTEX(ipqnl_mutex); | 69 | static DEFINE_MUTEX(ipqnl_mutex); |
| 70 | 70 | ||
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index adeafa2cc33..093b3ddc513 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
| @@ -73,17 +73,17 @@ atomic_t nf_conntrack_count = ATOMIC_INIT(0); | |||
| 73 | 73 | ||
| 74 | void (*nf_conntrack_destroyed)(struct nf_conn *conntrack) = NULL; | 74 | void (*nf_conntrack_destroyed)(struct nf_conn *conntrack) = NULL; |
| 75 | LIST_HEAD(nf_conntrack_expect_list); | 75 | LIST_HEAD(nf_conntrack_expect_list); |
| 76 | struct nf_conntrack_protocol **nf_ct_protos[PF_MAX]; | 76 | struct nf_conntrack_protocol **nf_ct_protos[PF_MAX] __read_mostly; |
| 77 | struct nf_conntrack_l3proto *nf_ct_l3protos[PF_MAX]; | 77 | struct nf_conntrack_l3proto *nf_ct_l3protos[PF_MAX] __read_mostly; |
| 78 | static LIST_HEAD(helpers); | 78 | static LIST_HEAD(helpers); |
| 79 | unsigned int nf_conntrack_htable_size __read_mostly = 0; | 79 | unsigned int nf_conntrack_htable_size __read_mostly = 0; |
| 80 | int nf_conntrack_max __read_mostly; | 80 | int nf_conntrack_max __read_mostly; |
| 81 | struct list_head *nf_conntrack_hash; | 81 | struct list_head *nf_conntrack_hash __read_mostly; |
| 82 | static kmem_cache_t *nf_conntrack_expect_cachep; | 82 | static kmem_cache_t *nf_conntrack_expect_cachep __read_mostly; |
| 83 | struct nf_conn nf_conntrack_untracked; | 83 | struct nf_conn nf_conntrack_untracked; |
| 84 | unsigned int nf_ct_log_invalid __read_mostly; | 84 | unsigned int nf_ct_log_invalid __read_mostly; |
| 85 | static LIST_HEAD(unconfirmed); | 85 | static LIST_HEAD(unconfirmed); |
| 86 | static int nf_conntrack_vmalloc; | 86 | static int nf_conntrack_vmalloc __read_mostly; |
| 87 | 87 | ||
| 88 | static unsigned int nf_conntrack_next_id; | 88 | static unsigned int nf_conntrack_next_id; |
| 89 | static unsigned int nf_conntrack_expect_next_id; | 89 | static unsigned int nf_conntrack_expect_next_id; |
