]> err.no Git - linux-2.6/commit
[FIB]: Reduce text size of net/ipv4/fib_trie.o
authorEric Dumazet <dada1@cosmosbay.com>
Sun, 13 Jan 2008 05:27:41 +0000 (21:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:01:58 +0000 (15:01 -0800)
commit112d8cfcbf4f5ef0cf669cb5864f1206972076d6
treea47c7a31adb9fc95f47688717d4639ef832d8974
parentb9aed45507b657abab0b88da2c9b509a9dc462b1
[FIB]: Reduce text size of net/ipv4/fib_trie.o

In struct tnode, we use two fields of 5 bits for 'pos' and 'bits'.
Switching to plain 'unsigned char' (8 bits) take the same space
because of compiler alignments, and reduce text size by 435 bytes
on i386.

On i386 :
$ size net/ipv4/fib_trie.o.before_patch net/ipv4/fib_trie.o
    text    data     bss     dec     hex filename
   13714       4      64   13782    35d6 net/ipv4/fib_trie.o.before
   13279       4      64   13347    3423 net/ipv4/fib_trie.o

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c