All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] netdev: fold name hash properly (v3)
Date: Tue, 10 Nov 2009 18:37:11 +0100	[thread overview]
Message-ID: <4AF9A4C7.4010703@gmail.com> (raw)
In-Reply-To: <20091110092034.3d4ee9b0@nehalam>

Stephen Hemminger a écrit :
> The full_name_hash function does not produce well distributed values in
> the lower bits, so most code uses hash_32() to fold it.  This is really
> a bug introduced when name hashing was added, back in 2.5 when I added
> name hashing.
> 
> hash_32 is all that is needed since full_name_hash returns unsigned int
> which is only 32 bits on 64 bit platforms.
> 
> Also, there is no point in using hash_32 on ifindex, because the is naturally
> sequential and usually well distributed.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Thanks Stephen


  reply	other threads:[~2009-11-10 17:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10 17:20 [PATCH] netdev: fold name hash properly (v3) Stephen Hemminger
2009-11-10 17:37 ` Eric Dumazet [this message]
2009-11-12  3:58   ` 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=4AF9A4C7.4010703@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.