Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=112d8cfcbf4f5ef0cf669cb5864f1206972076d6
Commit:     112d8cfcbf4f5ef0cf669cb5864f1206972076d6
Parent:     b9aed45507b657abab0b88da2c9b509a9dc462b1
Author:     Eric Dumazet <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 12 21:27:41 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:01:58 2008 -0800

    [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 <[EMAIL PROTECTED]>
    Acked-by: Stephen Hemminger <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/fib_trie.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 3e94a4d..350904c 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -118,8 +118,8 @@ struct leaf_info {
 struct tnode {
        t_key key;
        unsigned long parent;
-       unsigned short pos:5;           /* 2log(KEYLENGTH) bits needed */
-       unsigned short bits:5;          /* 2log(KEYLENGTH) bits needed */
+       unsigned char pos;              /* 2log(KEYLENGTH) bits needed */
+       unsigned char bits;             /* 2log(KEYLENGTH) bits needed */
        unsigned short full_children;   /* KEYLENGTH bits needed */
        unsigned short empty_children;  /* KEYLENGTH bits needed */
        struct rcu_head rcu;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to