#define SM_FLAGS_MOVED 0x0100
#define SM_FLAGS_PARTNER_SHORT_TIMEOUT 0x0200
#define SM_FLAGS_NTT 0x0400
+#define SM_FLAGS_EXPIRED 0x0800
#define BOND_LINK_FULL_DUPLEX_KEY 0x01
#define BOND_LINK_SPEED_KEY_10M 0x02
/** The operational Partner's port parameters */
struct port_params partner;
+ /** Partner administrative parameter values */
+ struct port_params partner_admin;
/* Additional port parameters not listed in documentation */
/** State machine flags */
timer_set(&port->current_while_timer, timeout);
ACTOR_STATE_CLR(port, EXPIRED);
+ SM_FLAG_CLR(port, EXPIRED);
return; /* No state change */
}
/* If CURRENT state timer is not running (stopped or expired)
* transit to EXPIRED state from DISABLED or CURRENT */
if (!timer_is_running(&port->current_while_timer)) {
- ACTOR_STATE_SET(port, EXPIRED);
- PARTNER_STATE_CLR(port, SYNCHRONIZATION);
- PARTNER_STATE_SET(port, LACP_SHORT_TIMEOUT);
- timer_set(&port->current_while_timer, internals->mode4.short_timeout);
+ if (SM_FLAG(port, EXPIRED)) {
+ port->selected = UNSELECTED;
+ memcpy(&port->partner, &port->partner_admin,
+ sizeof(struct port_params));
+ record_default(port);
+ ACTOR_STATE_CLR(port, EXPIRED);
+ timer_cancel(&port->current_while_timer);
+ } else {
+ SM_FLAG_SET(port, EXPIRED);
+ ACTOR_STATE_SET(port, EXPIRED);
+ PARTNER_STATE_CLR(port, SYNCHRONIZATION);
+ PARTNER_STATE_SET(port, LACP_SHORT_TIMEOUT);
+ timer_set(&port->current_while_timer,
+ internals->mode4.short_timeout);
+ }
}
}
port->actor.port_number = rte_cpu_to_be_16(slave_id + 1);
memcpy(&port->partner, &initial, sizeof(struct port_params));
+ memcpy(&port->partner_admin, &initial, sizeof(struct port_params));
/* default states */
port->actor_state = STATE_AGGREGATION | STATE_LACP_ACTIVE | STATE_DEFAULTED;