From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 015AA2D839C; Tue, 21 Jul 2026 16:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784649632; cv=none; b=e0O2nHbjGkEVo17YXmij9aSBqrWqItHOnQtXfmk1SRzZY3/i2Sxt0Rypjh+EaK6vwlF33WdONWZywPARMl3sdVx2bVr/V+umBW0u2N0FOolEVkhGmsNzexYlQU7E3rFSbvYQIcNj8cQrN4E7O+edALF6QuIhUPG0XARtOyvu2yM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784649632; c=relaxed/simple; bh=x3owP5LsCHOcbuIAtfrjSYk9P+BaVCxcnVWEkIj2144=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nYwgkDNnxSZwxCDRx+fqikO5kGE3U1oS7NWIMXEfGjmJvDGyU32ZyQsuf8QEydC+qq5DuaUvJ+VsIaJG1OecGwfJnsEjJgkE4lPwC76qUzfoksaXMuBLUq66ZUJ6MoUpbEuuAkDHttsLPPT6JF930vz52p5IF2xuCyUxTDt1UGQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eH3DfMXB; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eH3DfMXB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 650E21F000E9; Tue, 21 Jul 2026 16:00:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784649630; bh=hYVVt+/0O2CI1MCNkgRG4XVIjMFXT1f+Yoq0kAE3H3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eH3DfMXBCenzkvq3W15gl5oBCbALZPahcy6iQeemNuyRULxq8Aia5EU1+d+vRMYuK 2fj06zzQjfr4AUrNg6LmDN7z0JyI5DSeC3wgkZxFa5Az1nORylWhGxbJ3M6RB81xn4 l30XrttPSEOU/5vhEA7CRRPj97diFlM/Sw2Aqm6s= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Louis Scalbert , Jay Vosburgh , Jakub Kicinski , Sasha Levin Subject: [PATCH 7.1 0651/2077] bonding: 3ad: fix mux port state on oper down Date: Tue, 21 Jul 2026 17:05:24 +0200 Message-ID: <20260721152608.162972949@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152552.646164743@linuxfoundation.org> References: <20260721152552.646164743@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Louis Scalbert [ Upstream commit 807afc7544b865d4d09068a415fd5b71bf5665cc ] When the bonding interface has carrier down due to the absence of usable slaves and a slave transitions from down to up, the bonding interface briefly goes carrier up, then down again, and finally up once LACP negotiates collecting and distributing on the port. When lacp_strict mode is on, the interface should not transition to carrier up until LACP negotiation is complete. This happens because the actor and partner port states remain in Collecting_Distributing when the port goes down. When the port comes back up, it temporarily remains in this state until LACP renegotiation occurs. Previously this was mostly cosmetic, but since the bonding carrier state may depend on the LACP negotiation state, it causes the interface to flap. According to IEEE 802.3ad-2000 and IEEE 802.1ax-2014, Collecting and Distributing should be reset when a port goes down: - In the Receive state machine, port_enabled == FALSE causes a transition to the PORT_DISABLED state, which is expected to clear Partner_Oper_Port_State.Synchronization. - In the Mux state machine, Partner_Oper_Port_State.Synchronization == FALSE causes a transition to the ATTACHED state, which disables Collecting and Distributing. However, Partner_Oper_Port_State.Synchronization is not cleared in the PORT_DISABLED state. Clear Partner_Oper_Port_State.Synchronization in the Receive PORT_DISABLED state. Fixes: 655f8919d549 ("bonding: add min links parameter to 802.3ad") Signed-off-by: Louis Scalbert Acked-by: Jay Vosburgh Link: https://patch.msgid.link/20260603150331.1919611-6-louis.scalbert@6wind.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- 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 51d86e3d34db87..acbba08dbdfada 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -1337,6 +1337,7 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port) fallthrough; case AD_RX_PORT_DISABLED: port->sm_vars &= ~AD_PORT_MATCHED; + port->partner_oper.port_state &= ~LACP_STATE_SYNCHRONIZATION; break; case AD_RX_LACP_DISABLED: port->sm_vars &= ~AD_PORT_SELECTED; -- 2.53.0