diff options
author | Arjan van de Ven <arjan@infradead.org> | 2005-11-29 16:21:38 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-29 16:21:38 -0800 |
commit | 9b5b5cff9a6655dbb6d2e2be365bb95eec3950eb (patch) | |
tree | 80517910c731fc48512ba9c31aa823575db405b3 /net/ipv4/fib_hash.c | |
parent | fb29644994744a63bc57186cefa79534b5d9b5a9 (diff) | |
download | blackbird-op-linux-9b5b5cff9a6655dbb6d2e2be365bb95eec3950eb.tar.gz blackbird-op-linux-9b5b5cff9a6655dbb6d2e2be365bb95eec3950eb.zip |
[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/fib_hash.c')
-rw-r--r-- | net/ipv4/fib_hash.c | 2 |
1 files changed, 1 insertions, 1 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) static unsigned fib_flag_trans(int type, u32 mask, struct fib_info *fi) { - static unsigned type2flags[RTN_MAX + 1] = { + static const unsigned type2flags[RTN_MAX + 1] = { [7] = RTF_REJECT, [8] = RTF_REJECT, }; unsigned flags = type2flags[type]; |