Thread (4 messages) flat view 4 messages, 2 authors, 2012-07-01

Re: [PATCH V3 2/2] bonding support for IPv6 transmit hashing

From: Hannes Frederic Sowa <hidden>
Date: 2012-07-01 03:57:59

On Sat, Jun 30, 2012 at 9:38 PM, John [off-list ref] wrote:
On 6/30/2012 4:59 AM, Hannes Frederic Sowa wrote:
quoted
On Sat, Jun 30, 2012 at 8:17 AM, John [off-list ref] wrote:
quoted
diff --git a/Documentation/networking/bonding.txt
b/Documentation/networking/bonding.txt
index bfea8a3..5db14fe 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -752,12 +752,22 @@ xmit_hash_policy
                 protocol information to generate the hash.

                 Uses XOR of hardware MAC addresses and IP addresses to
-               generate the hash.  The formula is
+               generate the hash.  The IPv4 formula is

                 (((source IP XOR dest IP) AND 0xffff) XOR
                         ( source MAC XOR destination MAC ))
                                 modulo slave count

+               The IPv6 forumla is
+
+               iphash =
+                       (source ip quad 2 XOR dest IP quad 2) XOR
+                       (source ip quad 3 XOR dest IP quad 3) XOR
+                       (source ip quad 4 XOR dest IP quad 4)
+
+               ((iphash >> 16) XOR (iphash >> 8) XOR iphash)
+                       modulo slave count
+

Wouldn't it be beneficial to include the ipv6 flow label in the hash
calculation?
Hannes,

In all of the traffic I inspected I don't believe I saw a single flow label
set. Even if it were set 100% of the time by Linux, any packets routed or
bridged from another operating system wouldn't see any benefit. The current
algorithm distributes the traffic very well, I don't believe adding the flow
label would be beneficial even if it were set more frequently.

If you feel strongly about its inclusion, though, I am willing to
reconsider.
It would definitely help to load balance tunnelled traffic over a
bonded interface. But as I currently don't use such a setup, I don't
have a strong opinion on that.

Greetings,

  Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help