[ovs-dev] [PATCH] bond: Revalidate flows which bond_is_tcp_hash() changes;

Ethan Jackson ethan at nicira.com
Wed Apr 13 01:29:52 UTC 2011


If LACP causes the return of bond_is_tcp_hash to change for
whatever reason, all flows should be revalidated because they will
have a different hash result.
---
 lib/bond.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/lib/bond.c b/lib/bond.c
index b651d39..343c334 100644
--- a/lib/bond.c
+++ b/lib/bond.c
@@ -456,6 +456,7 @@ void
 bond_run(struct bond *bond, struct tag_set *tags)
 {
     struct bond_slave *slave;
+    bool is_tcp_hash = bond_is_tcp_hash(bond);
 
     /* Update link status. */
     if (bond->detect == BLSM_CARRIER
@@ -490,6 +491,14 @@ bond_run(struct bond *bond, struct tag_set *tags)
         bond->next_fake_iface_update = time_msec() + 1000;
     }
 
+    if (is_tcp_hash != bond_is_tcp_hash(bond)) {
+        struct bond_slave *slave;
+
+        HMAP_FOR_EACH (slave, hmap_node, &bond->slaves) {
+            tag_set_add(tags, slave->tag);
+        }
+    }
+
     /* Invalidate any tags required by  */
     tag_set_union(tags, &bond->unixctl_tags);
     tag_set_init(&bond->unixctl_tags);
-- 
1.7.4.2




More information about the dev mailing list