From: Ethan Jackson Date: Wed, 13 Apr 2011 01:28:04 +0000 (-0700) Subject: bond: Revalidate flows when bond_is_tcp_hash() changes; X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc9908b3fb496843603227752d2b63709afe82c7;p=openvswitch bond: Revalidate flows when bond_is_tcp_hash() changes; 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. --- diff --git a/lib/bond.c b/lib/bond.c index b651d399..343c334b 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);