diff options
author | Brian Haley <brian.haley@hp.com> | 2006-09-18 03:05:22 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:18:54 -0400 |
commit | 94aec08ea426903a3fb3cafd4d8b900cd50df702 (patch) | |
tree | d1c9bdea378dee85c06ef98151b3d8c383b55cc8 /net/ipv4 | |
parent | 4cbf1cae9f08c76ed92700090a69a5b1f1f6a982 (diff) |
[NETFILTER]: Change tunables to __read_mostly
Change some netfilter tunables to __read_mostly. Also fixed some
incorrect file reference comments while I was in there.
(this will be my last __read_mostly patch unless someone points out
something else that needs it)
Signed-off-by: Brian Haley <brian.haley@hp.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_core.c | 6 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_proto_generic.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_proto_icmp.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_proto_sctp.c | 14 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 24 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_proto_udp.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_standalone.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_queue.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 2 |
9 files changed, 30 insertions, 30 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index aa459177c3f8..5da25ad50309 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c | |||
@@ -66,13 +66,13 @@ void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack) = NULL; | |||
66 | LIST_HEAD(ip_conntrack_expect_list); | 66 | LIST_HEAD(ip_conntrack_expect_list); |
67 | struct ip_conntrack_protocol *ip_ct_protos[MAX_IP_CT_PROTO]; | 67 | struct ip_conntrack_protocol *ip_ct_protos[MAX_IP_CT_PROTO]; |
68 | static LIST_HEAD(helpers); | 68 | static LIST_HEAD(helpers); |
69 | unsigned int ip_conntrack_htable_size = 0; | 69 | unsigned int ip_conntrack_htable_size __read_mostly = 0; |
70 | int ip_conntrack_max; | 70 | int ip_conntrack_max __read_mostly; |
71 | struct list_head *ip_conntrack_hash; | 71 | struct list_head *ip_conntrack_hash; |
72 | static kmem_cache_t *ip_conntrack_cachep __read_mostly; | 72 | static kmem_cache_t *ip_conntrack_cachep __read_mostly; |
73 | static kmem_cache_t *ip_conntrack_expect_cachep __read_mostly; | 73 | static kmem_cache_t *ip_conntrack_expect_cachep __read_mostly; |
74 | struct ip_conntrack ip_conntrack_untracked; | 74 | struct ip_conntrack ip_conntrack_untracked; |
75 | unsigned int ip_ct_log_invalid; | 75 | unsigned int ip_ct_log_invalid __read_mostly; |
76 | static LIST_HEAD(unconfirmed); | 76 | static LIST_HEAD(unconfirmed); |
77 | static int ip_conntrack_vmalloc; | 77 | static int ip_conntrack_vmalloc; |
78 | 78 | ||
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_generic.c b/net/ipv4/netfilter/ip_conntrack_proto_generic.c index f891308b5e4c..36f2b5e5d80a 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_generic.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_generic.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/netfilter.h> | 12 | #include <linux/netfilter.h> |
13 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> | 13 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> |
14 | 14 | ||
15 | unsigned int ip_ct_generic_timeout = 600*HZ; | 15 | unsigned int ip_ct_generic_timeout __read_mostly = 600*HZ; |
16 | 16 | ||
17 | static int generic_pkt_to_tuple(const struct sk_buff *skb, | 17 | static int generic_pkt_to_tuple(const struct sk_buff *skb, |
18 | unsigned int dataoff, | 18 | unsigned int dataoff, |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c index 23f1c504586d..09c40ebe3345 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/netfilter_ipv4/ip_conntrack_core.h> | 21 | #include <linux/netfilter_ipv4/ip_conntrack_core.h> |
22 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> | 22 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> |
23 | 23 | ||
24 | unsigned int ip_ct_icmp_timeout = 30*HZ; | 24 | unsigned int ip_ct_icmp_timeout __read_mostly = 30*HZ; |
25 | 25 | ||
26 | #if 0 | 26 | #if 0 |
27 | #define DEBUGP printk | 27 | #define DEBUGP printk |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c index 2d3612cd5f18..b908a4842e18 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c | |||
@@ -58,13 +58,13 @@ static const char *sctp_conntrack_names[] = { | |||
58 | #define HOURS * 60 MINS | 58 | #define HOURS * 60 MINS |
59 | #define DAYS * 24 HOURS | 59 | #define DAYS * 24 HOURS |
60 | 60 | ||
61 | static unsigned int ip_ct_sctp_timeout_closed = 10 SECS; | 61 | static unsigned int ip_ct_sctp_timeout_closed __read_mostly = 10 SECS; |
62 | static unsigned int ip_ct_sctp_timeout_cookie_wait = 3 SECS; | 62 | static unsigned int ip_ct_sctp_timeout_cookie_wait __read_mostly = 3 SECS; |
63 | static unsigned int ip_ct_sctp_timeout_cookie_echoed = 3 SECS; | 63 | static unsigned int ip_ct_sctp_timeout_cookie_echoed __read_mostly = 3 SECS; |
64 | static unsigned int ip_ct_sctp_timeout_established = 5 DAYS; | 64 | static unsigned int ip_ct_sctp_timeout_established __read_mostly = 5 DAYS; |
65 | static unsigned int ip_ct_sctp_timeout_shutdown_sent = 300 SECS / 1000; | 65 | static unsigned int ip_ct_sctp_timeout_shutdown_sent __read_mostly = 300 SECS / 1000; |
66 | static unsigned int ip_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000; | 66 | static unsigned int ip_ct_sctp_timeout_shutdown_recd __read_mostly = 300 SECS / 1000; |
67 | static unsigned int ip_ct_sctp_timeout_shutdown_ack_sent = 3 SECS; | 67 | static unsigned int ip_ct_sctp_timeout_shutdown_ack_sent __read_mostly = 3 SECS; |
68 | 68 | ||
69 | static const unsigned int * sctp_timeouts[] | 69 | static const unsigned int * sctp_timeouts[] |
70 | = { NULL, /* SCTP_CONNTRACK_NONE */ | 70 | = { NULL, /* SCTP_CONNTRACK_NONE */ |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c index 9de81ff645d5..75a7237eb8c1 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c | |||
@@ -48,19 +48,19 @@ static DEFINE_RWLOCK(tcp_lock); | |||
48 | /* "Be conservative in what you do, | 48 | /* "Be conservative in what you do, |
49 | be liberal in what you accept from others." | 49 | be liberal in what you accept from others." |
50 | If it's non-zero, we mark only out of window RST segments as INVALID. */ | 50 | If it's non-zero, we mark only out of window RST segments as INVALID. */ |
51 | int ip_ct_tcp_be_liberal = 0; | 51 | int ip_ct_tcp_be_liberal __read_mostly = 0; |
52 | 52 | ||
53 | /* When connection is picked up from the middle, how many packets are required | 53 | /* When connection is picked up from the middle, how many packets are required |
54 | to pass in each direction when we assume we are in sync - if any side uses | 54 | to pass in each direction when we assume we are in sync - if any side uses |
55 | window scaling, we lost the game. | 55 | window scaling, we lost the game. |
56 | If it is set to zero, we disable picking up already established | 56 | If it is set to zero, we disable picking up already established |
57 | connections. */ | 57 | connections. */ |
58 | int ip_ct_tcp_loose = 3; | 58 | int ip_ct_tcp_loose __read_mostly = 3; |
59 | 59 | ||
60 | /* Max number of the retransmitted packets without receiving an (acceptable) | 60 | /* Max number of the retransmitted packets without receiving an (acceptable) |
61 | ACK from the destination. If this number is reached, a shorter timer | 61 | ACK from the destination. If this number is reached, a shorter timer |
62 | will be started. */ | 62 | will be started. */ |
63 | int ip_ct_tcp_max_retrans = 3; | 63 | int ip_ct_tcp_max_retrans __read_mostly = 3; |
64 | 64 | ||
65 | /* FIXME: Examine ipfilter's timeouts and conntrack transitions more | 65 | /* FIXME: Examine ipfilter's timeouts and conntrack transitions more |
66 | closely. They're more complex. --RR */ | 66 | closely. They're more complex. --RR */ |
@@ -83,19 +83,19 @@ static const char *tcp_conntrack_names[] = { | |||
83 | #define HOURS * 60 MINS | 83 | #define HOURS * 60 MINS |
84 | #define DAYS * 24 HOURS | 84 | #define DAYS * 24 HOURS |
85 | 85 | ||
86 | unsigned int ip_ct_tcp_timeout_syn_sent = 2 MINS; | 86 | unsigned int ip_ct_tcp_timeout_syn_sent __read_mostly = 2 MINS; |
87 | unsigned int ip_ct_tcp_timeout_syn_recv = 60 SECS; | 87 | unsigned int ip_ct_tcp_timeout_syn_recv __read_mostly = 60 SECS; |
88 | unsigned int ip_ct_tcp_timeout_established = 5 DAYS; | 88 | unsigned int ip_ct_tcp_timeout_established __read_mostly = 5 DAYS; |
89 | unsigned int ip_ct_tcp_timeout_fin_wait = 2 MINS; | 89 | unsigned int ip_ct_tcp_timeout_fin_wait __read_mostly = 2 MINS; |
90 | unsigned int ip_ct_tcp_timeout_close_wait = 60 SECS; | 90 | unsigned int ip_ct_tcp_timeout_close_wait __read_mostly = 60 SECS; |
91 | unsigned int ip_ct_tcp_timeout_last_ack = 30 SECS; | 91 | unsigned int ip_ct_tcp_timeout_last_ack __read_mostly = 30 SECS; |
92 | unsigned int ip_ct_tcp_timeout_time_wait = 2 MINS; | 92 | unsigned int ip_ct_tcp_timeout_time_wait __read_mostly = 2 MINS; |
93 | unsigned int ip_ct_tcp_timeout_close = 10 SECS; | 93 | unsigned int ip_ct_tcp_timeout_close __read_mostly = 10 SECS; |
94 | 94 | ||
95 | /* RFC1122 says the R2 limit should be at least 100 seconds. | 95 | /* RFC1122 says the R2 limit should be at least 100 seconds. |
96 | Linux uses 15 packets as limit, which corresponds | 96 | Linux uses 15 packets as limit, which corresponds |
97 | to ~13-30min depending on RTO. */ | 97 | to ~13-30min depending on RTO. */ |
98 | unsigned int ip_ct_tcp_timeout_max_retrans = 5 MINS; | 98 | unsigned int ip_ct_tcp_timeout_max_retrans __read_mostly = 5 MINS; |
99 | 99 | ||
100 | static const unsigned int * tcp_timeouts[] | 100 | static const unsigned int * tcp_timeouts[] |
101 | = { NULL, /* TCP_CONNTRACK_NONE */ | 101 | = { NULL, /* TCP_CONNTRACK_NONE */ |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_udp.c b/net/ipv4/netfilter/ip_conntrack_proto_udp.c index e58e52f14553..d0e8a16970ec 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_udp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_udp.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include <linux/netfilter_ipv4.h> | 18 | #include <linux/netfilter_ipv4.h> |
19 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> | 19 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> |
20 | 20 | ||
21 | unsigned int ip_ct_udp_timeout = 30*HZ; | 21 | unsigned int ip_ct_udp_timeout __read_mostly = 30*HZ; |
22 | unsigned int ip_ct_udp_timeout_stream = 180*HZ; | 22 | unsigned int ip_ct_udp_timeout_stream __read_mostly = 180*HZ; |
23 | 23 | ||
24 | static int udp_pkt_to_tuple(const struct sk_buff *skb, | 24 | static int udp_pkt_to_tuple(const struct sk_buff *skb, |
25 | unsigned int dataoff, | 25 | unsigned int dataoff, |
diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c index 7a9fa04a467a..3f5d495b853b 100644 --- a/net/ipv4/netfilter/ip_conntrack_standalone.c +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c | |||
@@ -534,7 +534,7 @@ static struct nf_hook_ops ip_conntrack_ops[] = { | |||
534 | 534 | ||
535 | /* Sysctl support */ | 535 | /* Sysctl support */ |
536 | 536 | ||
537 | int ip_conntrack_checksum = 1; | 537 | int ip_conntrack_checksum __read_mostly = 1; |
538 | 538 | ||
539 | #ifdef CONFIG_SYSCTL | 539 | #ifdef CONFIG_SYSCTL |
540 | 540 | ||
@@ -563,7 +563,7 @@ extern unsigned int ip_ct_udp_timeout_stream; | |||
563 | /* From ip_conntrack_proto_icmp.c */ | 563 | /* From ip_conntrack_proto_icmp.c */ |
564 | extern unsigned int ip_ct_icmp_timeout; | 564 | extern unsigned int ip_ct_icmp_timeout; |
565 | 565 | ||
566 | /* From ip_conntrack_proto_icmp.c */ | 566 | /* From ip_conntrack_proto_generic.c */ |
567 | extern unsigned int ip_ct_generic_timeout; | 567 | extern unsigned int ip_ct_generic_timeout; |
568 | 568 | ||
569 | /* Log invalid packets of a given protocol */ | 569 | /* Log invalid packets of a given protocol */ |
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 276a964ee6cf..80060cbe4a07 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -53,7 +53,7 @@ struct ipq_queue_entry { | |||
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 = IPQ_COPY_NONE; |
56 | static unsigned int queue_maxlen = 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; |
59 | static unsigned int copy_range; | 59 | static unsigned int copy_range; |
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index 663a73ee3f2f..790f00d500c3 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <net/netfilter/nf_conntrack_protocol.h> | 25 | #include <net/netfilter/nf_conntrack_protocol.h> |
26 | #include <net/netfilter/nf_conntrack_core.h> | 26 | #include <net/netfilter/nf_conntrack_core.h> |
27 | 27 | ||
28 | unsigned long nf_ct_icmp_timeout = 30*HZ; | 28 | unsigned long nf_ct_icmp_timeout __read_mostly = 30*HZ; |
29 | 29 | ||
30 | #if 0 | 30 | #if 0 |
31 | #define DEBUGP printk | 31 | #define DEBUGP printk |