[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20070503.173913.130238677.davem@davemloft.net>
Date: Thu, 03 May 2007 17:39:13 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dada1@...mosbay.com
Cc: yoshfuji@...ux-ipv6.org, netdev@...r.kernel.org
Subject: Re: [PATCH] IPV6 : Some cleanups in include/net/ipv6.h
From: Eric Dumazet <dada1@...mosbay.com>
Date: Thu, 3 May 2007 18:32:08 +0200
> 1) struct ip6_flowlabel : moves 'users' field to avoid two 32bits holes for 64bit arches. Shrinks by 8 bytes sizeof(struct ip6_flowlabel)
>
> 2) ipv6_addr_cmp() and ipv6_addr_copy() dont need (void *) casts :
> Compiler might take into account natural alignement of in6_addr structs to emit better code for memcpy()/memcmp()
> Casts to (void *) force byte accesses.
>
> 3) ipv6_addr_prefix() optimization :
> Better to clear whole struct, as compiler can emit better code for memset(addr, 0, 16) (2 stores on x86_64), and avoid some conditional branches.
>
> # size vmlinux.after vmlinux.before
> text data bss dec hex filename
> 5262262 647612 557432 6467306 62aeea vmlinux.after
> 5262550 647612 557432 6467594 62b00a vmlinux.before
>
> thats 288 bytes saved.
>
> Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
Applied, thanks Eric.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists