aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2005-11-29 19:21:38 -0500
committerDavid S. Miller <davem@davemloft.net>2005-11-29 19:21:38 -0500
commit9b5b5cff9a6655dbb6d2e2be365bb95eec3950eb (patch)
tree80517910c731fc48512ba9c31aa823575db405b3 /net/ipv4
parentfb29644994744a63bc57186cefa79534b5d9b5a9 (diff)
[NET]: Add const markers to various variables.
the patch below marks various variables const in net/; the goal is to move them to the .rodata section so that they can't false-share cachelines with things that get written to, as well as potentially helping gcc a bit with optimisations. (these were found using a gcc patch to warn about such variables) Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/fib_hash.c2
-rw-r--r--net/ipv4/fib_semantics.c2
-rw-r--r--net/ipv4/icmp.c4
-rw-r--r--net/ipv4/ipvs/ip_vs_conn.c2
-rw-r--r--net/ipv4/ipvs/ip_vs_ctl.c4
-rw-r--r--net/ipv4/ipvs/ip_vs_proto_tcp.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_amanda.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_ftp.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_irc.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_icmp.c4
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_sctp.c4
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_tcp.c6
-rw-r--r--net/ipv4/netfilter/ip_tables.c2
-rw-r--r--net/ipv4/netfilter/ipt_LOG.c2
-rw-r--r--net/ipv4/proc.c10
-rw-r--r--net/ipv4/route.c2
-rw-r--r--net/ipv4/tcp.c2
17 files changed, 27 insertions, 27 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 2a8c9afc3695..7ea0209cb169 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -975,7 +975,7 @@ static void fib_seq_stop(struct seq_file *seq, void *v)
975 975
976static unsigned fib_flag_trans(int type, u32 mask, struct fib_info *fi) 976static unsigned fib_flag_trans(int type, u32 mask, struct fib_info *fi)
977{ 977{
978 static unsigned type2flags[RTN_MAX + 1] = { 978 static const unsigned type2flags[RTN_MAX + 1] = {
979 [7] = RTF_REJECT, [8] = RTF_REJECT, 979 [7] = RTF_REJECT, [8] = RTF_REJECT,
980 }; 980 };
981 unsigned flags = type2flags[type]; 981 unsigned flags = type2flags[type];
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 186f20c4a45e..6d2a6ac070e3 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -83,7 +83,7 @@ for (nhsel=0; nhsel < 1; nhsel++)
83#define endfor_nexthops(fi) } 83#define endfor_nexthops(fi) }
84 84
85 85
86static struct 86static const struct
87{ 87{
88 int error; 88 int error;
89 u8 scope; 89 u8 scope;
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index e3eceecd0496..92e23b2ad4d2 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -220,7 +220,7 @@ struct icmp_control {
220 short error; /* This ICMP is classed as an error message */ 220 short error; /* This ICMP is classed as an error message */
221}; 221};
222 222
223static struct icmp_control icmp_pointers[NR_ICMP_TYPES+1]; 223static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
224 224
225/* 225/*
226 * The ICMP socket(s). This is the most convenient way to flow control 226 * The ICMP socket(s). This is the most convenient way to flow control
@@ -994,7 +994,7 @@ error:
994/* 994/*
995 * This table is the definition of how we handle ICMP. 995 * This table is the definition of how we handle ICMP.
996 */ 996 */
997static struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = { 997static const struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = {
998 [ICMP_ECHOREPLY] = { 998 [ICMP_ECHOREPLY] = {
999 .output_entry = ICMP_MIB_OUTECHOREPS, 999 .output_entry = ICMP_MIB_OUTECHOREPS,
1000 .input_entry = ICMP_MIB_INECHOREPS, 1000 .input_entry = ICMP_MIB_INECHOREPS,
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index f828fa2eb7de..2a3a8c59c655 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -771,7 +771,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
771 * The drop rate array needs tuning for real environments. 771 * The drop rate array needs tuning for real environments.
772 * Called from timer bh only => no locking 772 * Called from timer bh only => no locking
773 */ 773 */
774 static char todrop_rate[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; 774 static const char todrop_rate[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
775 static char todrop_counter[9] = {0}; 775 static char todrop_counter[9] = {0};
776 int i; 776 int i;
777 777
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 2d66848e7aa0..9bdcf31b760e 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -1909,7 +1909,7 @@ static int ip_vs_set_timeout(struct ip_vs_timeout_user *u)
1909#define DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user)) 1909#define DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user))
1910#define MAX_ARG_LEN SVCDEST_ARG_LEN 1910#define MAX_ARG_LEN SVCDEST_ARG_LEN
1911 1911
1912static unsigned char set_arglen[SET_CMDID(IP_VS_SO_SET_MAX)+1] = { 1912static const unsigned char set_arglen[SET_CMDID(IP_VS_SO_SET_MAX)+1] = {
1913 [SET_CMDID(IP_VS_SO_SET_ADD)] = SERVICE_ARG_LEN, 1913 [SET_CMDID(IP_VS_SO_SET_ADD)] = SERVICE_ARG_LEN,
1914 [SET_CMDID(IP_VS_SO_SET_EDIT)] = SERVICE_ARG_LEN, 1914 [SET_CMDID(IP_VS_SO_SET_EDIT)] = SERVICE_ARG_LEN,
1915 [SET_CMDID(IP_VS_SO_SET_DEL)] = SERVICE_ARG_LEN, 1915 [SET_CMDID(IP_VS_SO_SET_DEL)] = SERVICE_ARG_LEN,
@@ -2180,7 +2180,7 @@ __ip_vs_get_timeouts(struct ip_vs_timeout_user *u)
2180#define GET_TIMEOUT_ARG_LEN (sizeof(struct ip_vs_timeout_user)) 2180#define GET_TIMEOUT_ARG_LEN (sizeof(struct ip_vs_timeout_user))
2181#define GET_DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user) * 2) 2181#define GET_DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user) * 2)
2182 2182
2183static unsigned char get_arglen[GET_CMDID(IP_VS_SO_GET_MAX)+1] = { 2183static const unsigned char get_arglen[GET_CMDID(IP_VS_SO_GET_MAX)+1] = {
2184 [GET_CMDID(IP_VS_SO_GET_VERSION)] = 64, 2184 [GET_CMDID(IP_VS_SO_GET_VERSION)] = 64,
2185 [GET_CMDID(IP_VS_SO_GET_INFO)] = GET_INFO_ARG_LEN, 2185 [GET_CMDID(IP_VS_SO_GET_INFO)] = GET_INFO_ARG_LEN,
2186 [GET_CMDID(IP_VS_SO_GET_SERVICES)] = GET_SERVICES_ARG_LEN, 2186 [GET_CMDID(IP_VS_SO_GET_SERVICES)] = GET_SERVICES_ARG_LEN,
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c
index c19408973c09..0e878fd6215c 100644
--- a/net/ipv4/ipvs/ip_vs_proto_tcp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c
@@ -251,7 +251,7 @@ tcp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
251#define TCP_DIR_OUTPUT 4 251#define TCP_DIR_OUTPUT 4
252#define TCP_DIR_INPUT_ONLY 8 252#define TCP_DIR_INPUT_ONLY 8
253 253
254static int tcp_state_off[IP_VS_DIR_LAST] = { 254static const int tcp_state_off[IP_VS_DIR_LAST] = {
255 [IP_VS_DIR_INPUT] = TCP_DIR_INPUT, 255 [IP_VS_DIR_INPUT] = TCP_DIR_INPUT,
256 [IP_VS_DIR_OUTPUT] = TCP_DIR_OUTPUT, 256 [IP_VS_DIR_OUTPUT] = TCP_DIR_OUTPUT,
257 [IP_VS_DIR_INPUT_ONLY] = TCP_DIR_INPUT_ONLY, 257 [IP_VS_DIR_INPUT_ONLY] = TCP_DIR_INPUT_ONLY,
diff --git a/net/ipv4/netfilter/ip_conntrack_amanda.c b/net/ipv4/netfilter/ip_conntrack_amanda.c
index fa3f914117ec..e52847fa10f5 100644
--- a/net/ipv4/netfilter/ip_conntrack_amanda.c
+++ b/net/ipv4/netfilter/ip_conntrack_amanda.c
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
37module_param(master_timeout, int, 0600); 37module_param(master_timeout, int, 0600);
38MODULE_PARM_DESC(master_timeout, "timeout for the master connection"); 38MODULE_PARM_DESC(master_timeout, "timeout for the master connection");
39 39
40static char *conns[] = { "DATA ", "MESG ", "INDEX " }; 40static const char *conns[] = { "DATA ", "MESG ", "INDEX " };
41 41
42/* This is slow, but it's simple. --RR */ 42/* This is slow, but it's simple. --RR */
43static char *amanda_buffer; 43static char *amanda_buffer;
diff --git a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c
index 59e12b02b22c..68b173bcda60 100644
--- a/net/ipv4/netfilter/ip_conntrack_ftp.c
+++ b/net/ipv4/netfilter/ip_conntrack_ftp.c
@@ -55,7 +55,7 @@ static int try_rfc959(const char *, size_t, u_int32_t [], char);
55static int try_eprt(const char *, size_t, u_int32_t [], char); 55static int try_eprt(const char *, size_t, u_int32_t [], char);
56static int try_epsv_response(const char *, size_t, u_int32_t [], char); 56static int try_epsv_response(const char *, size_t, u_int32_t [], char);
57 57
58static struct ftp_search { 58static const struct ftp_search {
59 enum ip_conntrack_dir dir; 59 enum ip_conntrack_dir dir;
60 const char *pattern; 60 const char *pattern;
61 size_t plen; 61 size_t plen;
diff --git a/net/ipv4/netfilter/ip_conntrack_irc.c b/net/ipv4/netfilter/ip_conntrack_irc.c
index 2dea1db14406..d7c40421d0d1 100644
--- a/net/ipv4/netfilter/ip_conntrack_irc.c
+++ b/net/ipv4/netfilter/ip_conntrack_irc.c
@@ -59,7 +59,7 @@ MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC
59module_param(dcc_timeout, int, 0400); 59module_param(dcc_timeout, int, 0400);
60MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels"); 60MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels");
61 61
62static char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " }; 62static const char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " };
63#define MINMATCHLEN 5 63#define MINMATCHLEN 5
64 64
65#if 0 65#if 0
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
index e4d6b268e8c4..5f9925db608e 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
@@ -51,7 +51,7 @@ static int icmp_invert_tuple(struct ip_conntrack_tuple *tuple,
51 const struct ip_conntrack_tuple *orig) 51 const struct ip_conntrack_tuple *orig)
52{ 52{
53 /* Add 1; spaces filled with 0. */ 53 /* Add 1; spaces filled with 0. */
54 static u_int8_t invmap[] 54 static const u_int8_t invmap[]
55 = { [ICMP_ECHO] = ICMP_ECHOREPLY + 1, 55 = { [ICMP_ECHO] = ICMP_ECHOREPLY + 1,
56 [ICMP_ECHOREPLY] = ICMP_ECHO + 1, 56 [ICMP_ECHOREPLY] = ICMP_ECHO + 1,
57 [ICMP_TIMESTAMP] = ICMP_TIMESTAMPREPLY + 1, 57 [ICMP_TIMESTAMP] = ICMP_TIMESTAMPREPLY + 1,
@@ -110,7 +110,7 @@ static int icmp_packet(struct ip_conntrack *ct,
110 return NF_ACCEPT; 110 return NF_ACCEPT;
111} 111}
112 112
113static u_int8_t valid_new[] = { 113static const u_int8_t valid_new[] = {
114 [ICMP_ECHO] = 1, 114 [ICMP_ECHO] = 1,
115 [ICMP_TIMESTAMP] = 1, 115 [ICMP_TIMESTAMP] = 1,
116 [ICMP_INFO_REQUEST] = 1, 116 [ICMP_INFO_REQUEST] = 1,
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
index 59a4a0111dd3..977fb59d4563 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
@@ -65,7 +65,7 @@ static unsigned long ip_ct_sctp_timeout_shutdown_sent = 300 SECS / 1000;
65static unsigned long ip_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000; 65static unsigned long ip_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000;
66static unsigned long ip_ct_sctp_timeout_shutdown_ack_sent = 3 SECS; 66static unsigned long ip_ct_sctp_timeout_shutdown_ack_sent = 3 SECS;
67 67
68static unsigned long * sctp_timeouts[] 68static const unsigned long * sctp_timeouts[]
69= { NULL, /* SCTP_CONNTRACK_NONE */ 69= { NULL, /* SCTP_CONNTRACK_NONE */
70 &ip_ct_sctp_timeout_closed, /* SCTP_CONNTRACK_CLOSED */ 70 &ip_ct_sctp_timeout_closed, /* SCTP_CONNTRACK_CLOSED */
71 &ip_ct_sctp_timeout_cookie_wait, /* SCTP_CONNTRACK_COOKIE_WAIT */ 71 &ip_ct_sctp_timeout_cookie_wait, /* SCTP_CONNTRACK_COOKIE_WAIT */
@@ -118,7 +118,7 @@ cookie echoed to closed.
118*/ 118*/
119 119
120/* SCTP conntrack state transitions */ 120/* SCTP conntrack state transitions */
121static enum sctp_conntrack sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = { 121static const enum sctp_conntrack sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = {
122 { 122 {
123/* ORIGINAL */ 123/* ORIGINAL */
124/* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */ 124/* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
index ee3b7d6c4d2e..625981676776 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
@@ -99,7 +99,7 @@ unsigned long ip_ct_tcp_timeout_close = 10 SECS;
99 to ~13-30min depending on RTO. */ 99 to ~13-30min depending on RTO. */
100unsigned long ip_ct_tcp_timeout_max_retrans = 5 MINS; 100unsigned long ip_ct_tcp_timeout_max_retrans = 5 MINS;
101 101
102static unsigned long * tcp_timeouts[] 102static const unsigned long * tcp_timeouts[]
103= { NULL, /* TCP_CONNTRACK_NONE */ 103= { NULL, /* TCP_CONNTRACK_NONE */
104 &ip_ct_tcp_timeout_syn_sent, /* TCP_CONNTRACK_SYN_SENT, */ 104 &ip_ct_tcp_timeout_syn_sent, /* TCP_CONNTRACK_SYN_SENT, */
105 &ip_ct_tcp_timeout_syn_recv, /* TCP_CONNTRACK_SYN_RECV, */ 105 &ip_ct_tcp_timeout_syn_recv, /* TCP_CONNTRACK_SYN_RECV, */
@@ -170,7 +170,7 @@ enum tcp_bit_set {
170 * if they are invalid 170 * if they are invalid
171 * or we do not support the request (simultaneous open) 171 * or we do not support the request (simultaneous open)
172 */ 172 */
173static enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = { 173static const enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = {
174 { 174 {
175/* ORIGINAL */ 175/* ORIGINAL */
176/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */ 176/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */
@@ -817,7 +817,7 @@ void ip_conntrack_tcp_update(struct sk_buff *skb,
817#define TH_CWR 0x80 817#define TH_CWR 0x80
818 818
819/* table of valid flag combinations - ECE and CWR are always valid */ 819/* table of valid flag combinations - ECE and CWR are always valid */
820static u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] = 820static const u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] =
821{ 821{
822 [TH_SYN] = 1, 822 [TH_SYN] = 1,
823 [TH_SYN|TH_ACK] = 1, 823 [TH_SYN|TH_ACK] = 1,
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 75c27e92f6ab..45886c8475e8 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -1892,7 +1892,7 @@ static int ipt_get_matches(char *buffer, char **start, off_t offset, int length)
1892 return pos; 1892 return pos;
1893} 1893}
1894 1894
1895static struct { char *name; get_info_t *get_info; } ipt_proc_entry[] = 1895static const struct { char *name; get_info_t *get_info; } ipt_proc_entry[] =
1896{ { "ip_tables_names", ipt_get_tables }, 1896{ { "ip_tables_names", ipt_get_tables },
1897 { "ip_tables_targets", ipt_get_targets }, 1897 { "ip_tables_targets", ipt_get_targets },
1898 { "ip_tables_matches", ipt_get_matches }, 1898 { "ip_tables_matches", ipt_get_matches },
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index 92ed050fac69..180d6ca04af6 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -197,7 +197,7 @@ static void dump_packet(const struct nf_loginfo *info,
197 } 197 }
198 case IPPROTO_ICMP: { 198 case IPPROTO_ICMP: {
199 struct icmphdr _icmph, *ich; 199 struct icmphdr _icmph, *ich;
200 static size_t required_len[NR_ICMP_TYPES+1] 200 static const size_t required_len[NR_ICMP_TYPES+1]
201 = { [ICMP_ECHOREPLY] = 4, 201 = { [ICMP_ECHOREPLY] = 4,
202 [ICMP_DEST_UNREACH] 202 [ICMP_DEST_UNREACH]
203 = 8 + sizeof(struct iphdr), 203 = 8 + sizeof(struct iphdr),
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index a65e508fbd40..0d7dc668db46 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -98,7 +98,7 @@ fold_field(void *mib[], int offt)
98} 98}
99 99
100/* snmp items */ 100/* snmp items */
101static struct snmp_mib snmp4_ipstats_list[] = { 101static const struct snmp_mib snmp4_ipstats_list[] = {
102 SNMP_MIB_ITEM("InReceives", IPSTATS_MIB_INRECEIVES), 102 SNMP_MIB_ITEM("InReceives", IPSTATS_MIB_INRECEIVES),
103 SNMP_MIB_ITEM("InHdrErrors", IPSTATS_MIB_INHDRERRORS), 103 SNMP_MIB_ITEM("InHdrErrors", IPSTATS_MIB_INHDRERRORS),
104 SNMP_MIB_ITEM("InAddrErrors", IPSTATS_MIB_INADDRERRORS), 104 SNMP_MIB_ITEM("InAddrErrors", IPSTATS_MIB_INADDRERRORS),
@@ -119,7 +119,7 @@ static struct snmp_mib snmp4_ipstats_list[] = {
119 SNMP_MIB_SENTINEL 119 SNMP_MIB_SENTINEL
120}; 120};
121 121
122static struct snmp_mib snmp4_icmp_list[] = { 122static const struct snmp_mib snmp4_icmp_list[] = {
123 SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS), 123 SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS),
124 SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS), 124 SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS),
125 SNMP_MIB_ITEM("InDestUnreachs", ICMP_MIB_INDESTUNREACHS), 125 SNMP_MIB_ITEM("InDestUnreachs", ICMP_MIB_INDESTUNREACHS),
@@ -149,7 +149,7 @@ static struct snmp_mib snmp4_icmp_list[] = {
149 SNMP_MIB_SENTINEL 149 SNMP_MIB_SENTINEL
150}; 150};
151 151
152static struct snmp_mib snmp4_tcp_list[] = { 152static const struct snmp_mib snmp4_tcp_list[] = {
153 SNMP_MIB_ITEM("RtoAlgorithm", TCP_MIB_RTOALGORITHM), 153 SNMP_MIB_ITEM("RtoAlgorithm", TCP_MIB_RTOALGORITHM),
154 SNMP_MIB_ITEM("RtoMin", TCP_MIB_RTOMIN), 154 SNMP_MIB_ITEM("RtoMin", TCP_MIB_RTOMIN),
155 SNMP_MIB_ITEM("RtoMax", TCP_MIB_RTOMAX), 155 SNMP_MIB_ITEM("RtoMax", TCP_MIB_RTOMAX),
@@ -167,7 +167,7 @@ static struct snmp_mib snmp4_tcp_list[] = {
167 SNMP_MIB_SENTINEL 167 SNMP_MIB_SENTINEL
168}; 168};
169 169
170static struct snmp_mib snmp4_udp_list[] = { 170static const struct snmp_mib snmp4_udp_list[] = {
171 SNMP_MIB_ITEM("InDatagrams", UDP_MIB_INDATAGRAMS), 171 SNMP_MIB_ITEM("InDatagrams", UDP_MIB_INDATAGRAMS),
172 SNMP_MIB_ITEM("NoPorts", UDP_MIB_NOPORTS), 172 SNMP_MIB_ITEM("NoPorts", UDP_MIB_NOPORTS),
173 SNMP_MIB_ITEM("InErrors", UDP_MIB_INERRORS), 173 SNMP_MIB_ITEM("InErrors", UDP_MIB_INERRORS),
@@ -175,7 +175,7 @@ static struct snmp_mib snmp4_udp_list[] = {
175 SNMP_MIB_SENTINEL 175 SNMP_MIB_SENTINEL
176}; 176};
177 177
178static struct snmp_mib snmp4_net_list[] = { 178static const struct snmp_mib snmp4_net_list[] = {
179 SNMP_MIB_ITEM("SyncookiesSent", LINUX_MIB_SYNCOOKIESSENT), 179 SNMP_MIB_ITEM("SyncookiesSent", LINUX_MIB_SYNCOOKIESSENT),
180 SNMP_MIB_ITEM("SyncookiesRecv", LINUX_MIB_SYNCOOKIESRECV), 180 SNMP_MIB_ITEM("SyncookiesRecv", LINUX_MIB_SYNCOOKIESRECV),
181 SNMP_MIB_ITEM("SyncookiesFailed", LINUX_MIB_SYNCOOKIESFAILED), 181 SNMP_MIB_ITEM("SyncookiesFailed", LINUX_MIB_SYNCOOKIESFAILED),
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index e9c14f4a2eba..f701a136a6ae 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1371,7 +1371,7 @@ out: kfree_skb(skb);
1371 * are needed for AMPRnet AX.25 paths. 1371 * are needed for AMPRnet AX.25 paths.
1372 */ 1372 */
1373 1373
1374static unsigned short mtu_plateau[] = 1374static const unsigned short mtu_plateau[] =
1375{32000, 17914, 8166, 4352, 2002, 1492, 576, 296, 216, 128 }; 1375{32000, 17914, 8166, 4352, 2002, 1492, 576, 296, 216, 128 };
1376 1376
1377static __inline__ unsigned short guess_mtu(unsigned short old_mtu) 1377static __inline__ unsigned short guess_mtu(unsigned short old_mtu)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5e6bc4b32875..ef98b14ac56d 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1413,7 +1413,7 @@ recv_urg:
1413 * closed. 1413 * closed.
1414 */ 1414 */
1415 1415
1416static unsigned char new_state[16] = { 1416static const unsigned char new_state[16] = {
1417 /* current state: new state: action: */ 1417 /* current state: new state: action: */
1418 /* (Invalid) */ TCP_CLOSE, 1418 /* (Invalid) */ TCP_CLOSE,
1419 /* TCP_ESTABLISHED */ TCP_FIN_WAIT1 | TCP_ACTION_FIN, 1419 /* TCP_ESTABLISHED */ TCP_FIN_WAIT1 | TCP_ACTION_FIN,