/* Update LACP. */
if (bond->lacp) {
- HMAP_FOR_EACH (slave, hmap_node, &bond->slaves) {
- lacp_slave_enable(bond->lacp, slave, slave->enabled);
- }
-
lacp_run(bond->lacp, bond_send_pdu_cb);
}
enum slave_status status; /* Slave status. */
bool attached; /* Attached. Traffic may flow. */
- bool enabled; /* Enabled. Traffic is flowing. */
struct lacp_info partner; /* Partner information. */
struct lacp_info ntt_actor; /* Used to decide if we Need To Transmit. */
struct timer tx; /* Next message transmission timer. */
}
}
-/* Should be called regularly to indicate whether 'slave_' is enabled. An
- * enabled slave is allowed to send and receive traffic. Generally a slave
- * should not be enabled if its carrier is down, or lacp_slave_may_enable()
- * indicates it should not be enabled. */
-void
-lacp_slave_enable(struct lacp *lacp, void *slave_, bool enabled)
-{
- slave_lookup(lacp, slave_)->enabled = enabled;
-}
-
/* This function should be called whenever the carrier status of 'slave_' has
* changed. */
void
state |= LACP_STATE_AGG;
}
- if (slave->enabled) {
+ if (slave->attached || !slave->lacp->negotiated) {
state |= LACP_STATE_COL | LACP_STATE_DIST;
}
NOT_REACHED();
}
- ds_put_format(&ds, "\nslave: %s: %s %s %s\n", slave->name, status,
- slave->attached ? "attached" : "detached",
- slave->enabled ? "enabled" : "disabled");
+ ds_put_format(&ds, "\nslave: %s: %s %s\n", slave->name, status,
+ slave->attached ? "attached" : "detached");
ds_put_format(&ds, "\tport_id: %u\n", slave->port_id);
ds_put_format(&ds, "\tport_priority: %u\n", slave->port_priority);
void lacp_slave_register(struct lacp *, void *slave_,
const struct lacp_slave_settings *);
void lacp_slave_unregister(struct lacp *, const void *slave);
-void lacp_slave_enable(struct lacp *lacp, void *slave_, bool enabled);
void lacp_slave_carrier_changed(const struct lacp *, const void *slave);
bool lacp_slave_may_enable(const struct lacp *, const void *slave);
uint16_t lacp_slave_get_port_id(const struct lacp *, const void *slave);