]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[IPV6]: Some cleanups in include/net/ipv6.h
authorEric Dumazet <dada1@cosmosbay.com>
Fri, 4 May 2007 00:39:04 +0000 (17:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 May 2007 00:39:04 +0000 (17:39 -0700)
commitdb3459d1a71d885334831cdca6646a48f5ea0483
tree62bd17f8abb8c4fac280103b6179e275490c5b15
parentb40b4f79ce789e9e28d382c85006f62be2725282
[IPV6]: Some cleanups in include/net/ipv6.h

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@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h