All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Mirosław" <mirqus@gmail.com>
To: John <linux@8192.net>
Cc: netdev@vger.kernel.org, andy@greyhouse.net
Subject: Re: [PATCH 1/2] bonding: Doesn't support IPv6
Date: Sat, 29 Oct 2011 09:55:29 +0200	[thread overview]
Message-ID: <CAHXqBF+CcX=FQNSSsdsEAc9jAqi0G3RNLPjRCcc7wJ+QYnzzSA@mail.gmail.com> (raw)
In-Reply-To: <4EAB5455.5080004@8192.net>

2011/10/29 John <linux@8192.net>:
> --- a/drivers/net/bonding/bond_main.c   2011-04-19 11:18:48.000000000 -0700
> +++ b/drivers/net/bonding/bond_main.c   2011-10-27 11:26:20.000000000 -0700
[...]
> +               v6hash = (v6hash >> 16) ^ (v6hash >> 8) ^ v6hash;

This XORs in only 3 of 4 bytes, and assuming count > 256 (its unlikely
you have more than 256 slaves in bond) the most significant byte is
wasted. It should be:

v6hash ^= v6hash >> 16;
v6hash ^= v6hash >> 8;

Same for IPv4 part.

OTOH, if that was your intention, then the description in your mail was wrong.

Best Regards,
Michał Mirosław

  reply	other threads:[~2011-10-29  7:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29  1:18 [PATCH 1/2] bonding: Doesn't support IPv6 John
2011-10-29  7:55 ` Michał Mirosław [this message]
2011-10-29  8:49   ` Eric Dumazet
2011-10-29  9:00     ` Eric Dumazet

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='CAHXqBF+CcX=FQNSSsdsEAc9jAqi0G3RNLPjRCcc7wJ+QYnzzSA@mail.gmail.com' \
    --to=mirqus@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=linux@8192.net \
    --cc=netdev@vger.kernel.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 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.