Skip to content

Commit

Permalink
bonding: Update layer2 and layer2+3 hash formula documentation
Browse files Browse the repository at this point in the history
When using layer2 or layer2+3 hash, only the 5th byte of the MAC
addresses is used.

Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gal Pressman authored and David S. Miller committed Apr 8, 2022
1 parent 2105f70 commit 2cd1881
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/networking/bonding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ xmit_hash_policy
Uses XOR of hardware MAC addresses and packet type ID
field to generate the hash. The formula is

hash = source MAC XOR destination MAC XOR packet type ID
hash = source MAC[5] XOR destination MAC[5] XOR packet type ID
slave number = hash modulo slave count

This algorithm will place all traffic to a particular
Expand All @@ -910,7 +910,7 @@ xmit_hash_policy
Uses XOR of hardware MAC addresses and IP addresses to
generate the hash. The formula is

hash = source MAC XOR destination MAC XOR packet type ID
hash = source MAC[5] XOR destination MAC[5] XOR packet type ID
hash = hash XOR source IP XOR destination IP
hash = hash XOR (hash RSHIFT 16)
hash = hash XOR (hash RSHIFT 8)
Expand Down

0 comments on commit 2cd1881

Please sign in to comment.