linux/drivers/net/bonding
Louis Scalbert 807afc7544 bonding: 3ad: fix mux port state on oper down
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: 655f8919d5 ("bonding: add min links parameter to 802.3ad")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Acked-by: Jay Vosburgh <jv@jvosburgh.net>
Link: https://patch.msgid.link/20260603150331.1919611-6-louis.scalbert@6wind.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-10 07:53:36 -07:00
..
bond_3ad.c bonding: 3ad: fix mux port state on oper down 2026-06-10 07:53:36 -07:00
bond_alb.c net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
bond_debugfs.c net: bonding: fix NULL deref in bond_debug_rlb_hash_show 2026-03-18 18:05:40 -07:00
bond_main.c bonding: 3ad: add lacp_strict configuration knob 2026-06-10 07:53:26 -07:00
bond_netlink.c bonding: 3ad: add lacp_strict configuration knob 2026-06-10 07:53:26 -07:00
bond_options.c bonding: 3ad: fix carrier when no usable slaves 2026-06-10 07:53:33 -07:00
bond_procfs.c bonding: annotate data-races in sysfs and procfs 2026-06-04 18:03:07 -07:00
bond_sysfs_slave.c bonding: 3ad: implement proper RCU rules for port->aggregator 2026-04-29 18:32:02 -07:00
bond_sysfs.c bonding: annotate data-races in sysfs and procfs 2026-06-04 18:03:07 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00