COVERAGE_DEFINE(bridge_flush);
COVERAGE_DEFINE(bridge_process_flow);
COVERAGE_DEFINE(bridge_reconfigure);
+COVERAGE_DEFINE(bridge_lacp_update);
enum lacp_status {
LACP_STATUS_CURRENT, /* Partner is up to date. */
size_t i;
struct iface *lead;
struct lacp_info lead_pri;
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 10);
port->lacp_need_update = false;
+ COVERAGE_INC(bridge_lacp_update);
if (!port->lacp) {
return;
}
+ VLOG_DBG_RL(&rl, "port %s: re-evaluating LACP link status", port->name);
+
lead = NULL;
for (i = 0; i < port->n_ifaces; i++) {
struct iface *iface = port->ifaces[i];
/* Don't allow loopback interfaces to send traffic or lead. */
if (eth_addr_equals(iface->lacp_partner.sysid,
iface->lacp_actor.sysid)) {
- static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 10);
VLOG_WARN_RL(&rl, "iface %s: Loopback detected. Interface is "
"connected to its own bridge", iface->name);
iface->lacp_attached = false;
bond_mode_to_string(port->bond_mode));
if (port->lacp) {
- ds_put_format(&ds, "\tlacp: %s\n",
+ ds_put_format(&ds, "lacp: %s\n",
port->lacp & LACP_ACTIVE ? "active" : "passive");
} else {
- ds_put_cstr(&ds, "\tlacp: off\n");
+ ds_put_cstr(&ds, "lacp: off\n");
}
if (port->bond_mode != BM_AB) {
struct flow flow;
/* Basic info. */
- ds_put_format(&ds, "slave %s: %s\n",
+ ds_put_format(&ds, "\nslave %s: %s\n",
iface->name, iface->enabled ? "enabled" : "disabled");
if (j == port->active_iface) {
ds_put_cstr(&ds, "\tactive slave\n");
ds_put_cstr(&ds, "\tpartner state: ");
ds_put_lacp_state(&ds, iface->lacp_partner.state);
- ds_put_cstr(&ds, "\n\n");
+ ds_put_cstr(&ds, "\n");
}
if (port->bond_mode == BM_AB) {