提交 ec891c8b 编写于 作者: M Mahesh Bandewar 提交者: David S. Miller

bonding: remove "port-moved" state that was never implemented

LACP state-machine defines "port-moved" state when the same ActorSystemID
and Port are seen in a LACPDU received on different port. The state is
never set since it's not implemented. However the state-machine attempts
to clear that state occasionally. LACP state machine is already complicated
and since this state is not implemented, removing it's checks makes the
state-machine little simpler.
Signed-off-by: NMahesh Bandewar <maheshb@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8b426dc5
...@@ -1052,8 +1052,7 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port) ...@@ -1052,8 +1052,7 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
port->sm_rx_state = AD_RX_INITIALIZE; port->sm_rx_state = AD_RX_INITIALIZE;
port->sm_vars |= AD_PORT_CHURNED; port->sm_vars |= AD_PORT_CHURNED;
/* check if port is not enabled */ /* check if port is not enabled */
} else if (!(port->sm_vars & AD_PORT_BEGIN) } else if (!(port->sm_vars & AD_PORT_BEGIN) && !port->is_enabled)
&& !port->is_enabled && !(port->sm_vars & AD_PORT_MOVED))
port->sm_rx_state = AD_RX_PORT_DISABLED; port->sm_rx_state = AD_RX_PORT_DISABLED;
/* check if new lacpdu arrived */ /* check if new lacpdu arrived */
else if (lacpdu && ((port->sm_rx_state == AD_RX_EXPIRED) || else if (lacpdu && ((port->sm_rx_state == AD_RX_EXPIRED) ||
...@@ -1081,11 +1080,8 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port) ...@@ -1081,11 +1080,8 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
/* if no lacpdu arrived and no timer is on */ /* if no lacpdu arrived and no timer is on */
switch (port->sm_rx_state) { switch (port->sm_rx_state) {
case AD_RX_PORT_DISABLED: case AD_RX_PORT_DISABLED:
if (port->sm_vars & AD_PORT_MOVED) if (port->is_enabled &&
port->sm_rx_state = AD_RX_INITIALIZE; (port->sm_vars & AD_PORT_LACP_ENABLED))
else if (port->is_enabled
&& (port->sm_vars
& AD_PORT_LACP_ENABLED))
port->sm_rx_state = AD_RX_EXPIRED; port->sm_rx_state = AD_RX_EXPIRED;
else if (port->is_enabled else if (port->is_enabled
&& ((port->sm_vars && ((port->sm_vars
...@@ -1115,7 +1111,6 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port) ...@@ -1115,7 +1111,6 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
port->sm_vars &= ~AD_PORT_SELECTED; port->sm_vars &= ~AD_PORT_SELECTED;
__record_default(port); __record_default(port);
port->actor_oper_port_state &= ~AD_STATE_EXPIRED; port->actor_oper_port_state &= ~AD_STATE_EXPIRED;
port->sm_vars &= ~AD_PORT_MOVED;
port->sm_rx_state = AD_RX_PORT_DISABLED; port->sm_rx_state = AD_RX_PORT_DISABLED;
/* Fall Through */ /* Fall Through */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册