| To: | <bonding-devel@xxxxxxxxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx> |
|---|---|
| Subject: | Question about the hash used in XOR mode |
| From: | Shmulik Hen <shmulik.hen@xxxxxxxxx> |
| Date: | Sun, 21 Sep 2003 16:37:37 +0300 |
| Organization: | Intel corp. |
| Reply-to: | shmulik.hen@xxxxxxxxx |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | KMail/1.4.3 |
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. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2.6.0-test5][NETROM] timer code cleanup, Vinay K Nallamothu |
|---|---|
| Next by Date: | ppp ifindex WAS(Re: ipt_physdev.c alignment problems on parisc64, jamal |
| Previous by Thread: | [PATCH 2.6.0-test5][NETROM] timer code cleanup, Vinay K Nallamothu |
| Next by Thread: | Re: Question about the hash used in XOR mode, Jay Vosburgh |
| Indexes: | [Date] [Thread] [Top] [All Lists] |