/*
- * Copyright (c) 2008, 2009, 2010, 2011 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
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,
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) {
may_send_learning_packets(const struct bond *bond)
{
return bond->lacp_status == LACP_DISABLED
- && bond->balance != BM_AB
&& bond->balance != BM_STABLE
&& bond->active_slave;
}
* is located. For each MAC that has been learned on a port other than 'bond',
* it should call bond_compose_learning_packet().
*
- * This function will only return true if 'bond' is in SLB mode and LACP is not
- * negotiated. Otherwise sending learning packets isn't necessary.
+ * This function will only return true if 'bond' is in SLB or active-backup
+ * mode and LACP is not negotiated. Otherwise sending learning packets isn't
+ * necessary.
*
* Calling this function resets the state that it checks. */
bool
{
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);
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;
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;
}
e->tag = tag_create_random();
}
+ *tags |= e->tag;
return e->slave;
default: