[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251124043310.34073-2-liuhangbin@gmail.com>
Date: Mon, 24 Nov 2025 04:33:08 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: netdev@...r.kernel.org
Cc: Jay Vosburgh <jv@...sburgh.net>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Mahesh Bandewar <maheshb@...gle.com>,
Shuah Khan <shuah@...nel.org>,
linux-kselftest@...r.kernel.org,
Hangbin Liu <liuhangbin@...il.com>
Subject: [PATCH net 1/3] bonding: set AD_RX_PORT_DISABLED when disabling a port
When disabling a port’s collecting and distributing states, updating only
rx_disabled is not sufficient. We also need to set AD_RX_PORT_DISABLED
so that the rx_machine transitions into the AD_RX_EXPIRED state.
One example is in ad_agg_selection_logic(): when a new aggregator is
selected and old active aggregator is disabled, if AD_RX_PORT_DISABLED is
not set, the disabled port may remain stuck in AD_RX_CURRENT due to
continuing to receive partner LACP messages.
The __disable_port() called by ad_disable_collecting_distributing()
does not have this issue, since its caller also clears the
collecting/distributing bits.
The __disable_port() called by bond_3ad_bind_slave() should also be fine,
as the RX state machine is re-initialized to AD_RX_INITIALIZE.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
---
drivers/net/bonding/bond_3ad.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 49717b7b82a2..d6bd3615d129 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -205,6 +205,7 @@ static void __enable_collecting_port(struct port *port)
*/
static inline void __disable_port(struct port *port)
{
+ port->sm_rx_state = AD_RX_PORT_DISABLED;
bond_set_slave_inactive_flags(port->slave, BOND_SLAVE_NOTIFY_LATER);
}
--
2.50.1
Powered by blists - more mailing lists