netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: yoshfuji@linux-ipv6.org, netdev@vger.kernel.org
Subject: Re: [RFC, PATCH] IPV6 : add 64 bits components in struct in6_addr to speedup ipv6_addr_equal() & ipv6_addr_any()
Date: Mon, 30 Apr 2007 12:10:29 -0700 (PDT)	[thread overview]
Message-ID: <20070430.121029.21927349.davem@davemloft.net> (raw)
In-Reply-To: <20070430162851.ca3c7869.dada1@cosmosbay.com>

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Mon, 30 Apr 2007 16:28:51 +0200

> On 64bit arches, we can speedup some IPV6 addresses compares, using 64 bits fields in struct in6_addr.
> 
> I am not sure if this patch wont break some user ABI, maybe we should use some ifdef(KERNEL) ?
> 
> This patch saves some space, and also reduce number of conditional branches in ipv6_addr_equal()
> 
> # size vmlinux*
>    text    data     bss     dec     hex filename
> 6257978  692044  660472 7610494  74207e vmlinux
> 6259178  692044  660472 7611694  74252e vmlinux.before_patch
> 
> Note : Maybe ipv6_addr_cmp() could be defined on top of ipv6_addr_equal() ?
> 
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

Unfortunately, as mentioned elsewhere, we're only able to assume
32-bit alignment of ipv6 packet headers and that isn't likely to
change any time soon.

So, for example, you patch would fill my log file with unaligned trap
messages on my sparc64 workstation.

  parent reply	other threads:[~2007-04-30 19:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-30 14:28 [RFC, PATCH] IPV6 : add 64 bits components in struct in6_addr to speedup ipv6_addr_equal() & ipv6_addr_any() Eric Dumazet
2007-04-30 16:09 ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-30 16:27 ` Brian Haley
2007-04-30 18:59   ` David Miller
2007-04-30 19:08     ` Eric Dumazet
2007-04-30 19:22       ` David Miller
2007-04-30 19:10 ` David Miller [this message]
2007-04-30 21:34   ` Andi Kleen
2007-04-30 20:37     ` David Miller

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=20070430.121029.21927349.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).