[ovs-dev] [PATCH 1/1] bond: Fixing bond hash tag usage

Zoltan Kiss zoltan.kiss at citrix.com
Thu Dec 20 21:39:06 UTC 2012


As the description of this field states, it should link the hash entry
to the slave. With random tags, the flow revalidation never finds the
corresponding facet after bond rebalancing, therefore the flow
entries never get updated.
I've tested it on Xenserver 6.1 (OVS 1.4.2), two NIC with LACP bonding
and 4 VMs running iperf client against iperf servers running on two
separate hosts on the same Ethernet switch (1 Gbps connection each).
Running a similar command like the following during test
running helps you to see whether the flow entries followed the
rebalancing or not:

ovs-dpctl dump-flows xapi1|grep dst=5001; ovs-appctl bond/show bond0

Signed-off-by: Zoltan Kiss <zoltan.kiss at citrix.com>
---
 lib/bond.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bond.c b/lib/bond.c
index 2c59f9d..ba98fff 100644
--- a/lib/bond.c
+++ b/lib/bond.c
@@ -739,7 +739,7 @@ bond_shift_load(struct bond_entry *hash, struct bond_slave *to,
     /* Arrange for flows to be revalidated. */
     tag_set_add(set, hash->tag);
     hash->slave = to;
-    hash->tag = tag_create_random();
+    hash->tag = to->tag;
 }
 
 /* Pick and returns a bond_entry to migrate to 'to' (the least-loaded slave),
@@ -1446,7 +1446,7 @@ choose_output_slave(const struct bond *bond, const struct flow *flow,
             if (!e->slave->enabled) {
                 e->slave = bond->active_slave;
             }
-            e->tag = tag_create_random();
+            e->tag = e->slave->tag;
         }
         *tags |= e->tag;
         return e->slave;
-- 
1.8.0




More information about the dev mailing list