diff options
author | Arjan van de Ven <arjan@infradead.org> | 2005-11-29 19:21:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-29 19:21:38 -0500 |
commit | 9b5b5cff9a6655dbb6d2e2be365bb95eec3950eb (patch) | |
tree | 80517910c731fc48512ba9c31aa823575db405b3 /net/ipv4/proc.c | |
parent | fb29644994744a63bc57186cefa79534b5d9b5a9 (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/proc.c')
-rw-r--r-- | net/ipv4/proc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index a65e508fbd4..0d7dc668db4 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 */ |
101 | static struct snmp_mib snmp4_ipstats_list[] = { | 101 | static 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 | ||
122 | static struct snmp_mib snmp4_icmp_list[] = { | 122 | static 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 | ||
152 | static struct snmp_mib snmp4_tcp_list[] = { | 152 | static 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 | ||
170 | static struct snmp_mib snmp4_udp_list[] = { | 170 | static 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 | ||
178 | static struct snmp_mib snmp4_net_list[] = { | 178 | static 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), |