From: Shmulik Hen <shmulik.hen@intel.com>
To: <bonding-devel@lists.sourceforge.net>, <netdev@oss.sgi.com>
Subject: Question about the hash used in XOR mode
Date: Sun, 21 Sep 2003 16:37:37 +0300 [thread overview]
Message-ID: <200309211637.37136.shmulik.hen@intel.com> (raw)
In bond_xmit_xor(), we have the following:
slave = bond->prev;
.
.
.
slave_no = (data->h_dest[5]^slave->dev->dev_addr[5]) % bond->slave_cnt;
Which should give us a number between 0 and slave_cnt-1 which is constant
per destination address, hence acts as a hash function. But, the fact is
slave->dev->dev_addr[5] is the same the whole time, and is actually the
same as bond->device->dev_addr[5].
Is there a special meaning for XORing with a constant ?
Wouldn't it be the same is we did just:
slave_no = data->h_dest[5] % bond->slave_cnt;
--
| Shmulik Hen Advanced Network Services |
| Israel Design Center, Jerusalem |
| LAN Access Division, Platform Networking |
| Intel Communications Group, Intel corp. |
next reply other threads:[~2003-09-21 13:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-21 13:37 Shmulik Hen [this message]
2003-09-23 20:31 ` Question about the hash used in XOR mode Jay Vosburgh
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=200309211637.37136.shmulik.hen@intel.com \
--to=shmulik.hen@intel.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=netdev@oss.sgi.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 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).