Skip to contentSkip to conversation

bonding: LACP state machine variable "port-moved" is never set

PATCH In review Mahesh Bandewar 2 participants 2 messages Apr 3, 2015 – Apr 6, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: LACP state machine variable "port-moved" is never set

The state-machine checks for the presence of this flag and attempts to clear it but the value is never set. So why have it?

---
 drivers/net/bonding/bond_3ad.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/net/bonding/bond_3ad.c +3 -8
index 451d9dbd392f..cc37183f2a8a 100644
@@ -1018,8 +1018,7 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
 		port->sm_rx_state = AD_RX_INITIALIZE;
 		port->sm_vars |= AD_PORT_CHURNED;
 	/* check if port is not enabled */
-	} else if (!(port->sm_vars & AD_PORT_BEGIN)
-		 && !port->is_enabled && !(port->sm_vars & AD_PORT_MOVED))
+	} else if (!(port->sm_vars & AD_PORT_BEGIN) && !port->is_enabled)
 		port->sm_rx_state = AD_RX_PORT_DISABLED;
 	/* check if new lacpdu arrived */
 	else if (lacpdu && ((port->sm_rx_state == AD_RX_EXPIRED) ||
@@ -1047,11 +1046,8 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
 			/* if no lacpdu arrived and no timer is on */
 			switch (port->sm_rx_state) {
 			case AD_RX_PORT_DISABLED:
-				if (port->sm_vars & AD_PORT_MOVED)
-					port->sm_rx_state = AD_RX_INITIALIZE;
-				else if (port->is_enabled
-					 && (port->sm_vars
-					     & AD_PORT_LACP_ENABLED))
+				if (port->is_enabled &&
+				    (port->sm_vars & AD_PORT_LACP_ENABLED))
 					port->sm_rx_state = AD_RX_EXPIRED;
 				else if (port->is_enabled
 					 && ((port->sm_vars
@@ -1081,7 +1077,6 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
 			port->sm_vars &= ~AD_PORT_SELECTED;
 			__record_default(port);
 			port->actor_oper_port_state &= ~AD_STATE_EXPIRED;
-			port->sm_vars &= ~AD_PORT_MOVED;
 			port->sm_rx_state = AD_RX_PORT_DISABLED;
 
 			/* Fall Through */
Signature · 1 line
2.2.0.rc0.207.ga3a616c
maintainer
#1 lore raw

From: Mahesh Bandewar <[email protected]>
Date: Fri, 3 Apr 2015 13:54:10 -0700

Quoted 4 lines

The state-machine checks for the presence of this flag and attempts to clear it but the value is never set. So why have it?

This commit log message doesn't sound like you are asserting that this adjustment should made.

It sounds more like you actually aren't really sure, and you're asking folks on the list what the intent of this code is.

I'm not applying this until the commit log is adjusted to show that you are absolutely certain that this change is valid.