X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fbond.c;h=25a0fa1a9e6ffaf3020215fa77650ff68b644e9f;hb=3840c40624f366f560af6165c7e36ec13fc3a51b;hp=71784160acf4fa64afff1a51ef3847b1a375907e;hpb=477879ea870814d297e65ebccc91c6a73a0cf160;p=openvswitch diff --git a/lib/bond.c b/lib/bond.c index 71784160..25a0fa1a 100644 --- a/lib/bond.c +++ b/lib/bond.c @@ -133,7 +133,7 @@ static struct bond_entry *lookup_bond_entry(const struct bond *, static tag_type bond_get_active_slave_tag(const struct bond *); static struct bond_slave *choose_output_slave(const struct bond *, const struct flow *, - uint16_t vlan); + uint16_t vlan, tag_type *tags); static void bond_update_fake_slave_stats(struct bond *); /* Attempts to parse 's' as the name of a bond balancing mode. If successful, @@ -255,6 +255,12 @@ bond_reconfigure(struct bond *bond, const struct bond_settings *s) if (bond->balance != s->balance) { bond->balance = s->balance; revalidate = true; + + if (bond->balance == BM_STABLE) { + VLOG_WARN_ONCE("Stable bond mode is deprecated and may be removed" + " in February 2013. Please email" + " dev@openvswitch.org with concerns."); + } } if (bond->basis != s->basis) { @@ -523,13 +529,14 @@ bond_compose_learning_packet(struct bond *bond, { struct bond_slave *slave; struct ofpbuf *packet; + tag_type tags = 0; struct flow flow; assert(may_send_learning_packets(bond)); memset(&flow, 0, sizeof flow); memcpy(flow.dl_src, eth_src, ETH_ADDR_LEN); - slave = choose_output_slave(bond, &flow, vlan); + slave = choose_output_slave(bond, &flow, vlan, &tags); packet = ofpbuf_new(0); compose_rarp(packet, eth_src); @@ -637,7 +644,7 @@ void * bond_choose_output_slave(struct bond *bond, const struct flow *flow, uint16_t vlan, tag_type *tags) { - struct bond_slave *slave = choose_output_slave(bond, flow, vlan); + struct bond_slave *slave = choose_output_slave(bond, flow, vlan, tags); if (slave) { *tags |= bond->balance == BM_STABLE ? bond->stb_tag : slave->tag; return slave->aux; @@ -1405,7 +1412,7 @@ choose_stb_slave(const struct bond *bond, uint32_t flow_hash) static struct bond_slave * choose_output_slave(const struct bond *bond, const struct flow *flow, - uint16_t vlan) + uint16_t vlan, tag_type *tags) { struct bond_entry *e; @@ -1441,6 +1448,7 @@ choose_output_slave(const struct bond *bond, const struct flow *flow, } e->tag = tag_create_random(); } + *tags |= e->tag; return e->slave; default: