Skip to content

bonding: fix 802.3ad churn machine and port state issues

Hangbin Liu linux-kselftest lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 11 repliesIn review
  2. v23 patches 11 repliesSuperseded
  3. v13 patches 6 repliesSuperseded

v2 from the cover letter

* set AD_RX_PORT_DISABLED only in ad_agg_selection_logic to avoid side effect. (Paolo Abeni)
* remove actor_churn as it can only be true when the state is ACTOR_CHURN (Paolo Abeni)
* remove AD_PORT_CHURNED since we don't need it anywhere (Paolo Abeni)
* I didn't add new helper for ad_churn_machine() as it looks not help much.
* https://lore.kernel.org/netdev/[email protected]
v1: https://lore.kernel.org/netdev/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bonding: set AD_RX_PORT_DISABLED when disabling a portdrivers/net/bonding/bond_3ad.c+1 -07 replies
2/3bonding: restructure ad_churn_machinedrivers/net/bonding/bond_3ad.c+71 -254 replies
3/3selftests: bonding: add mux and churn state testingtools/testing/selftests/drivers/net/bonding/Makefile tools/testing/selftests/drivers/net/bonding/bond_lacp_ad_select.sh+74 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchLiang Li
1/3
2/3T-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHv3 net 0/3] bonding: fix 802.3ad churn machine and port state issues

This series fixes two issues in the bonding 802.3ad implementation related to port state management and churn detection:

1. When disabling a port, we need to set AD_RX_PORT_DISABLED to ensure proper state machine transitions, preventing ports from getting stuck in AD_RX_CURRENT state.

2. The ad_churn_machine implementation is restructured to follow IEEE 802.1AX-2014 specifications correctly. The current implementation has several issues: it doesn't transition to "none" state immediately when synchronization is achieved, and can get stuck in churned state in multi-aggregator scenarios.

3. Selftests are enhanced to validate both mux state machine and churn state logic under aggregator selection and failover scenarios.

These changes ensure proper LACP state machine behavior and fix issues where ports could remain in incorrect states during aggregator failover.

v3: re-post to net, no code change (Jakub)
v2:
* set AD_RX_PORT_DISABLED only in ad_agg_selection_logic to avoid side effect. (Paolo Abeni)
* remove actor_churn as it can only be true when the state is ACTOR_CHURN (Paolo Abeni)
* remove AD_PORT_CHURNED since we don't need it anywhere (Paolo Abeni)
* I didn't add new helper for ad_churn_machine() as it looks not help much.
* https://lore.kernel.org/netdev/[email protected]
v1: https://lore.kernel.org/netdev/[email protected]

Hangbin Liu (3):
bonding: set AD_RX_PORT_DISABLED when disabling a port
bonding: restructure ad_churn_machine
selftests: bonding: add mux and churn state testing

 drivers/net/bonding/bond_3ad.c                | 97 ++++++++++++++-----
 .../selftests/drivers/net/bonding/Makefile    |  2 +-
 ...nd_lacp_prio.sh => bond_lacp_ad_select.sh} | 73 ++++++++++++++
 3 files changed, 146 insertions(+), 26 deletions(-)
 rename tools/testing/selftests/drivers/net/bonding/{bond_lacp_prio.sh => bond_lacp_ad_select.sh} (64%)
Signature · 1 line
2.50.1