public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 0/3] bonding: 3ad: fix mux port state on oper down
@ 2026-03-25 13:44 Louis Scalbert
  2026-03-25 13:44 ` [PATCH net v2 1/3] bonding: 3ad: fix carrier when no valid slaves Louis Scalbert
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Louis Scalbert @ 2026-03-25 13:44 UTC (permalink / raw)
  To: netdev
  Cc: andrew+netdev, jv, edumazet, kuba, pabeni, fbl, andy, shemminger,
	Louis Scalbert

Hi everyone,

This series addresses a blackholing issue and a subsequent link-flapping
issue in the 802.3ad bonding driver when dealing with inactive slaves
and the `min_links` parameter.

Currently, when an 802.3ad bond has no slaves in the collecting
/ distributing state, the bonding master still reports its carrier as up.
This causes upper-layer protocols to consider the interface operational,
resulting in silently dropped traffic. 

Patch 1 fixes the core issue by ensuring the carrier is only asserted when
at least `min_links` slaves are genuinely in a valid state (collecting/
distributing, or collecting only if coupled_control is disabled).

Patch 2 fixes a side effect of the first patch. Tightening the carrier 
logic exposes a state persistence bug: when a physical link goes down, 
the LACP collecting/distributing flags remain set. When the link returns, 
the interface briefly hallucinates that it is ready, bounces the carrier 
up, and then drops it again once LACP renegotiation starts. Unsetting the 
SELECTED flag when the link goes down forces the state machine through 
DETACHED, clearing the stale flags and preventing the flap.

Patch 3 fixes a side effect of the second patch caused by clearing the
SELECTED flag on disabled ports. After all ports in an aggregator go
down, if only a subset of ports comes back up, those ports can no
longer renegotiate LACP unless all aggregator ports come back up.

Changelog:

v1 -> v2
  - Patch 1: split a comment line that exceeded 80 characters.
  - Move the change from patch 2 in __agg_ports_are_ready() into a third
    patch, as it is actually a side effect of the fix introduced in
    patch 2.
  - Patch 2: Expand the commit message and add a code comment describing
    the change in ad_port_selection_logic().
  - Patch 3: Check the READY_N flag only on ports in the WAITING state,
    rather than on all enabled ports. This more closely matches 802.3ad.
  Link: https://lore.kernel.org/netdev/20260316131838.3257889-1-louis.scalbert@6wind.com/

Louis Scalbert (3):
  bonding: 3ad: fix carrier when no valid slaves
  bonding: 3ad: fix mux port state on oper down
  bonding: 3ad: fix stuck negotiation on recovery

 drivers/net/bonding/bond_3ad.c | 36 +++++++++++++++++++++++++++++++---
 1 file changed, 33 insertions(+), 3 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-27 16:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 13:44 [PATCH net v2 0/3] bonding: 3ad: fix mux port state on oper down Louis Scalbert
2026-03-25 13:44 ` [PATCH net v2 1/3] bonding: 3ad: fix carrier when no valid slaves Louis Scalbert
2026-03-27 16:16   ` Louis Scalbert
2026-03-27 16:37     ` Mahesh Bandewar (महेश बंडेवार)
2026-03-27 16:56     ` Jay Vosburgh
2026-03-25 13:44 ` [PATCH net v2 2/3] bonding: 3ad: fix mux port state on oper down Louis Scalbert
2026-03-25 13:44 ` [PATCH net v2 3/3] bonding: 3ad: fix stuck negotiation on recovery Louis Scalbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox