Skip to content

bonding: fix negotiation flapping in 802.3ad passive mode

Hangbin Liu linux-kselftest lkml netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesApplied 3/3
  2. v23 patches 3 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Changes in v3 from the cover letter

a) const bond_params for ad_initialize_port (Paolo Abeni)
b) add comment about why we need to sleep in test script (Paolo Abeni)

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bonding: update LACP activity flag after setting lacp_activedrivers/net/bonding/bond_3ad.c drivers/net/bonding/bond_options.c include/net/bond_3ad.h+27 -00 repliesApplied
2/3bonding: send LACPDUs periodically in passive mode after receiving partner's LACPDUdrivers/net/bonding/bond_3ad.c+24 -180 repliesApplied
3/3selftests: bonding: add test for passive LACP modetools/testing/selftests/drivers/net/bonding/Makefile tools/testing/selftests/drivers/net/bonding/bond_passive_lacp.sh tools/testing/selftests/drivers/net/bonding/config+108 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCHv3 net 0/3] bonding: fix negotiation flapping in 802.3ad passive mode

This patch fixes unstable LACP negotiation when bonding is configured in passive mode (lacp_active=off).

Previously, the actor would stop sending LACPDUs after initial negotiation succeeded, leading to the partner timing out and restarting the negotiation cycle. This resulted in continuous LACP state flapping.

The fix ensures the passive actor starts sending periodic LACPDUs after receiving the first LACPDU from the partner, in accordance with IEEE 802.1AX-2020 section 6.4.1.

v3:
a) const bond_params for ad_initialize_port (Paolo Abeni)
b) add comment about why we need to sleep in test script (Paolo Abeni)

v2:
a) Split the patch in to 2 parts. One for lacp_active setting. One for passive mode negotiation flapping issue. (Nikolay Aleksandrov)
b) Update fixes tags and some comments (Nikolay Aleksandrov)
c) Update selftest to pass on normal kernel (Jakub Kicinski)

Hangbin Liu (3):
bonding: update LACP activity flag after setting lacp_active
bonding: send LACPDUs periodically in passive mode after receiving
partner's LACPDU
selftests: bonding: add test for passive LACP mode

 drivers/net/bonding/bond_3ad.c                |  67 ++++++++---
 drivers/net/bonding/bond_options.c            |   1 +
 include/net/bond_3ad.h                        |   1 +
 .../selftests/drivers/net/bonding/Makefile    |   3 +-
 .../drivers/net/bonding/bond_passive_lacp.sh  | 105 ++++++++++++++++++
 .../selftests/drivers/net/bonding/config      |   1 +
 6 files changed, 159 insertions(+), 19 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond_passive_lacp.sh
Signature · 1 line
2.50.1