aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2005-11-29 16:21:38 -0800
committerDavid S. Miller <davem@davemloft.net>2005-11-29 16:21:38 -0800
commit9b5b5cff9a6655dbb6d2e2be365bb95eec3950eb (patch)
tree80517910c731fc48512ba9c31aa823575db405b3 /net/ipv4/netfilter/ip_conntrack_proto_icmp.c
parentfb29644994744a63bc57186cefa79534b5d9b5a9 (diff)
downloadlinux-9b5b5cff9a6655dbb6d2e2be365bb95eec3950eb.tar.gz
[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/netfilter/ip_conntrack_proto_icmp.c')
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_icmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
index e4d6b268e8c4e..5f9925db608ef 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,
const struct ip_conntrack_tuple *orig)
{
/* Add 1; spaces filled with 0. */
- static u_int8_t invmap[]
+ static const u_int8_t invmap[]
= { [ICMP_ECHO] = ICMP_ECHOREPLY + 1,
[ICMP_ECHOREPLY] = ICMP_ECHO + 1,
[ICMP_TIMESTAMP] = ICMP_TIMESTAMPREPLY + 1,
@@ -110,7 +110,7 @@ static int icmp_packet(struct ip_conntrack *ct,
return NF_ACCEPT;
}
-static u_int8_t valid_new[] = {
+static const u_int8_t valid_new[] = {
[ICMP_ECHO] = 1,
[ICMP_TIMESTAMP] = 1,
[ICMP_INFO_REQUEST] = 1,