struct hmap slaves; /* Slaves this LACP object controls. */
struct slave *key_slave; /* Slave whose ID will be the aggregation key. */
+ bool fast; /* Fast or Slow LACP time. */
bool negotiated; /* True if LACP negotiations were successful. */
bool update; /* True if lacp_update() needs to be called. */
};
void
lacp_configure(struct lacp *lacp, const char *name,
uint8_t sys_id[ETH_ADDR_LEN], uint16_t sys_priority,
- bool active)
+ bool active, bool fast)
{
if (!lacp->name || strcmp(name, lacp->name)) {
free(lacp->name);
memcpy(lacp->sys_id, sys_id, ETH_ADDR_LEN);
lacp->sys_priority = sys_priority;
lacp->active = active;
+ lacp->fast = fast;
}
/* Processes 'pdu', a parsed LACP packet received on 'slave_'. This function
struct slave *slave = slave_lookup(lacp, slave_);
slave->status = LACP_CURRENT;
- slave->rx = time_msec() + LACP_SLOW_TIME_RX;
+ slave->rx = time_msec() + (lacp->fast
+ ? LACP_FAST_TIME_RX
+ : LACP_SLOW_TIME_RX);
slave->ntt_actor = pdu->partner;
state |= LACP_STATE_ACT;
}
+ if (slave->lacp->fast) {
+ state |= LACP_STATE_TIME;
+ }
+
if (slave->attached) {
state |= LACP_STATE_SYNC;
}
struct lacp *lacp_create(void);
void lacp_destroy(struct lacp *);
void lacp_configure(struct lacp *, const char *name, uint8_t sys_id[8],
- uint16_t sys_priority, bool active);
+ uint16_t sys_priority, bool active, bool fast);
void lacp_process_pdu(struct lacp *, const void *slave,
const struct lacp_pdu *);
bool lacp_negotiated(const struct lacp *);
/* LACP information. */
struct lacp *lacp; /* LACP object. NULL if LACP is disabled. */
bool lacp_active; /* True if LACP is active */
+ bool lacp_fast; /* True if LACP is in fast mode. */
uint16_t lacp_priority; /* LACP system priority. */
/* SLB specific bonding info. */
}
shash_destroy(&new_ifaces);
+ port->lacp_fast = !strcmp(get_port_other_config(cfg, "lacp-time", "slow"),
+ "fast");
+
lacp_priority =
atoi(get_port_other_config(cfg, "lacp-system-priority", "0"));
lacp_configure(port->lacp, port->name,
port->bridge->ea, port->lacp_priority,
- port->lacp_active);
+ port->lacp_active, port->lacp_fast);
for (i = 0; i < port->n_ifaces; i++) {
struct iface *iface = port->ifaces[i];
LACP negotiations, link status decisions are made by the system
with the numerically lower priority. Must be a number between 1
and 65535.</dd>
+ <dt><code>lacp-time</code></dt>
+ <dd> The LACP timing which should be used on this
+ <ref table="Port"/>. Possible values are <code>fast</code> and
+ <code>slow</code>. By default <code>slow</code> is used. When
+ configured to be <code>fast</code> more frequent LACP heartbeats
+ will be requested causing connectivity problems to be detected more
+ quickly.</dd>
</dl>
</column>
</group>