116 mif->
selected = LACP_PORT_UNSELECTED;
120 case LACP_MUX_STATE_DETACHED:
122 case LACP_MUX_STATE_WAITING:
124 case LACP_MUX_STATE_ATTACHED:
127 case LACP_MUX_STATE_COLLECTING_DISTRIBUTING:
128 if (mif->
partner.state & LACP_STATE_SYNCHRONIZATION)
135 LACP_MUX_EVENT_UNSELECTED, &mif->
mux_state);
142 (mif->
partner.state & LACP_STATE_AGGREGATION) ||
154 mif->
actor.state |= LACP_STATE_DEFAULTED;
160 lacp_pdu_t *lacpdu = (lacp_pdu_t *) mif->
last_rx_pkt;
162 if ((lacpdu->actor.port_info.state & LACP_STATE_AGGREGATION) !=
163 (mif->
partner.state & LACP_STATE_AGGREGATION) ||
164 memcmp (&mif->
partner, &lacpdu->actor.port_info,
174 lacp_pdu_t *lacpdu = (lacp_pdu_t *) mif->
last_rx_pkt;
175 u8 states = LACP_STATE_LACP_ACTIVITY | LACP_STATE_LACP_TIMEOUT |
176 LACP_STATE_SYNCHRONIZATION | LACP_STATE_AGGREGATION;
178 if ((states & lacpdu->partner.port_info.state) !=
179 (states & mif->
actor.state)
180 || memcmp (&mif->
actor, &lacpdu->partner.port_info,
181 sizeof (mif->
actor) -
sizeof (mif->
actor.state)))
195 lacp_pdu_t *lacpdu = (lacp_pdu_t *) mif->
last_rx_pkt;
197 if ((!memcmp (&mif->
partner, &lacpdu->actor.port_info,
199 ((mif->
actor.state & LACP_STATE_AGGREGATION) ==
200 (lacpdu->partner.port_info.state & LACP_STATE_AGGREGATION))) ||
201 ((lacpdu->actor.port_info.state & LACP_STATE_AGGREGATION) == 0))
210 lacp_pdu_t *lacpdu = (lacp_pdu_t *) mif->
last_rx_pkt;
214 if (!(mif->
partner.state & LACP_STATE_LACP_ACTIVITY) &&
215 (lacpdu->actor.port_info.state & LACP_STATE_LACP_ACTIVITY))
218 mif->
partner = lacpdu->actor.port_info;
219 mif->
actor.state &= ~LACP_STATE_DEFAULTED;
220 if (match && (lacpdu->actor.port_info.state & LACP_STATE_SYNCHRONIZATION))
221 mif->
partner.state |= LACP_STATE_SYNCHRONIZATION;
223 mif->
partner.state &= ~LACP_STATE_SYNCHRONIZATION;
233 LACP_RX_EVENT_PORT_MOVED, &mif->
rx_state);
236 LACP_RX_EVENT_PORT_DISABLED, &mif->
rx_state);
247 mif->
actor.state &= ~LACP_STATE_EXPIRED;
251 LACP_RX_EVENT_BEGIN, &mif->
rx_state);
262 mif->
partner.state &= ~LACP_STATE_SYNCHRONIZATION;
266 LACP_RX_EVENT_PORT_MOVED, &mif->
rx_state);
272 LACP_RX_EVENT_LACP_ENABLED, &mif->
rx_state);
275 LACP_RX_EVENT_LACP_DISABLED, &mif->
rx_state);
288 mif->
partner.state &= ~LACP_STATE_SYNCHRONIZATION;
289 mif->
partner.state |= LACP_STATE_LACP_TIMEOUT;
297 mif->
actor.state |= LACP_STATE_EXPIRED;
300 LACP_RX_EVENT_TIMER_EXPIRED, &mif->
rx_state);
303 LACP_RX_EVENT_PDU_RECEIVED, &mif->
rx_state);
316 mif->
partner.state &= ~LACP_STATE_AGGREGATION;
317 mif->
actor.state &= ~LACP_STATE_EXPIRED;
331 mif->
actor.state &= ~LACP_STATE_EXPIRED;
334 LACP_RX_EVENT_PDU_RECEIVED, &mif->
rx_state);
344 lacp_pdu_t *lacpdu = (lacp_pdu_t *) mif->
last_rx_pkt;
349 if ((mif != mif2) && (mif2->
rx_state == LACP_RX_STATE_PORT_DISABLED) &&
351 lacpdu->partner.port_info.system, 6) &&
352 (mif2->
partner.port_number == lacpdu->partner.port_info.port_number))
371 mif->
actor.state &= ~LACP_STATE_EXPIRED;
382 #define _(b, s, n) {.bit = b, .str = #s, },
387 int e = va_arg (*args,
int);
390 if (e >= (
sizeof (lacp_rx_event_array) /
sizeof (*event_entry)))
391 s =
format (s,
"Bad event %d", e);
393 s =
format (s,
"%s", event_entry[e].str);
429 LACP_RX_EVENT_LACP_ENABLED, &mif->
rx_state);