netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 net 0/3] bonding: fix negotiation flapping in 802.3ad passive mode
@ 2025-08-05  9:46 Hangbin Liu
  2025-08-05  9:46 ` [PATCHv2 net 1/3] bonding: update LACP activity flag after setting lacp_active Hangbin Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hangbin Liu @ 2025-08-05  9:46 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Nikolay Aleksandrov, Simon Horman,
	Shuah Khan, linux-kselftest, linux-kernel, Hangbin Liu

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.

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  | 95 +++++++++++++++++++
 5 files changed, 148 insertions(+), 19 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond_passive_lacp.sh

-- 
2.46.0


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

end of thread, other threads:[~2025-08-14  9:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05  9:46 [PATCHv2 net 0/3] bonding: fix negotiation flapping in 802.3ad passive mode Hangbin Liu
2025-08-05  9:46 ` [PATCHv2 net 1/3] bonding: update LACP activity flag after setting lacp_active Hangbin Liu
2025-08-05  9:46 ` [PATCHv2 net 2/3] bonding: send LACPDUs periodically in passive mode after receiving partner's LACPDU Hangbin Liu
2025-08-12  9:14   ` Paolo Abeni
2025-08-05  9:46 ` [PATCHv2 net 3/3] selftests: bonding: add test for passive LACP mode Hangbin Liu
2025-08-12  9:23   ` Paolo Abeni
2025-08-14  9:54     ` Hangbin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).