bond: Always use L4 hash for stable bonds.
authorEthan Jackson <ethan@nicira.com>
Mon, 23 May 2011 18:37:15 +0000 (11:37 -0700)
committerEthan Jackson <ethan@nicira.com>
Mon, 23 May 2011 20:21:14 +0000 (13:21 -0700)
Stable bonds are used in such specialized cases that it doesn't
make sense to require LACP negotiations to use L4 hashing.

lib/bond.c
vswitchd/vswitch.xml

index 9a688be..85bb2da 100644 (file)
@@ -1305,8 +1305,8 @@ bond_link_status_update(struct bond_slave *slave, struct tag_set *tags)
 static bool
 bond_is_tcp_hash(const struct bond *bond)
 {
-    return (bond->balance == BM_TCP || bond->balance == BM_STABLE)
-        && bond->lacp_negotiated;
+    return (bond->balance == BM_TCP && bond->lacp_negotiated)
+        || bond->balance == BM_STABLE;
 }
 
 static unsigned int
index 85bf162..4288ee6 100644 (file)
           <p>Attempts to always assign a given flow to the same slave
             consistently.  In an effort to maintain stability, no load
             balancing is done.  Uses a similar hashing strategy to
-            <code>balance-tcp</code>, falling back to <code>balance-slb</code>
-            style hashing when LACP negotiations are unsuccessful.</p>
+            <code>balance-tcp</code>, always taking into account L3 and L4
+            fields even if LACP negotiations are unsuccessful. </p>
           <p>Slave selection decisions are made based on
             <code>bond-stable-id</code> if set.  Otherwise, OpenFlow port
             number is used.  Decisions are consistent across all ovs-vswitchd