From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: yoshfuji@linux-ipv6.org, netdev@vger.kernel.org
Subject: Re: [PATCH] IPV6 : Some cleanups in include/net/ipv6.h
Date: Thu, 03 May 2007 17:39:13 -0700 (PDT) [thread overview]
Message-ID: <20070503.173913.130238677.davem@davemloft.net> (raw)
In-Reply-To: <20070503183208.8e4c325b.dada1@cosmosbay.com>
From: Eric Dumazet <dada1@cosmosbay.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@cosmosbay.com>
Applied, thanks Eric.
prev parent reply other threads:[~2007-05-04 0:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 4:00 [PATCH] IPV6 : get rid of __HAVE_ARCH_ADDR_SET Eric Dumazet
2007-05-03 10:09 ` David Miller
2007-05-03 16:32 ` [PATCH] IPV6 : Some cleanups in include/net/ipv6.h Eric Dumazet
2007-05-04 0:39 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070503.173913.130238677.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dada1@cosmosbay.com \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).