linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] bonding: fix negotiation flapping in 802.3ad passive mode
@ 2025-07-25  6:28 Hangbin Liu
  2025-07-25  6:28 ` [PATCH net 1/2] bonding: send LACPDUs periodically in passive mode after receiving partner's LACPDU Hangbin Liu
  2025-07-25  6:28 ` [PATCH net 2/2] selftests: bonding: add test for passive LACP mode Hangbin Liu
  0 siblings, 2 replies; 14+ messages in thread
From: Hangbin Liu @ 2025-07-25  6:28 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, Jonathan Corbet, Petr Machata, Amit Cohen,
	Vladimir Oltean, Alessandro Zanni, linux-doc, 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.

Out of topic:
Although this patch addresses a functional bug and could be considered for
`net`, I'm slightly concerned about potential regressions, as it changes
the current bonding LACP protocol behavior.

It might be safer to merge this through `net-next` first to allow broader
testing. Thoughts?

Hangbin Liu (2):
  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                | 72 ++++++++++----
 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  | 93 +++++++++++++++++++
 5 files changed, 151 insertions(+), 19 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond_passive_lacp.sh

-- 
2.46.0


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH net 0/2] bonding: fix LACP negotiation issues in passive mode
@ 2025-07-09  9:03 Hangbin Liu
  2025-07-09  9:03 ` [PATCH net 2/2] selftests: bonding: add test for passive LACP mode Hangbin Liu
  0 siblings, 1 reply; 14+ messages in thread
From: Hangbin Liu @ 2025-07-09  9:03 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 patchset fixes an issue where bonding fails to establish a stable LACP
negotiation when operating in passive mode (lacp_active=off).

In passive mode, the current implementation only replies when the partner's
state changes, which results in LACP timeout and unstable aggregator formation.

With this change, the bond responds to each received LACPDU in passive mode
by setting ntt = true, ensuring timely replies and stable LACP negotiation.

Hangbin Liu (2):
  bonding: update ntt to true in passive mode
  selftests: bonding: add test for passive LACP mode

 drivers/net/bonding/bond_3ad.c                |  6 ++
 .../drivers/net/bonding/bond_passive_lacp.sh  | 21 +++++
 .../drivers/net/bonding/bond_topo_lacp.sh     | 77 +++++++++++++++++++
 3 files changed, 104 insertions(+)
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond_passive_lacp.sh
 create mode 100644 tools/testing/selftests/drivers/net/bonding/bond_topo_lacp.sh

-- 
2.46.0


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

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

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25  6:28 [PATCH net 0/2] bonding: fix negotiation flapping in 802.3ad passive mode Hangbin Liu
2025-07-25  6:28 ` [PATCH net 1/2] bonding: send LACPDUs periodically in passive mode after receiving partner's LACPDU Hangbin Liu
2025-07-25  8:49   ` Nikolay Aleksandrov
2025-07-25 12:46     ` Hangbin Liu
2025-07-25  6:28 ` [PATCH net 2/2] selftests: bonding: add test for passive LACP mode Hangbin Liu
2025-07-25 14:21   ` Jakub Kicinski
2025-08-01  9:01     ` Hangbin Liu
  -- strict thread matches above, loose matches on Subject: below --
2025-07-09  9:03 [PATCH net 0/2] bonding: fix LACP negotiation issues in passive mode Hangbin Liu
2025-07-09  9:03 ` [PATCH net 2/2] selftests: bonding: add test for passive LACP mode Hangbin Liu
2025-07-15  9:37   ` Paolo Abeni
2025-07-16 11:23     ` Hangbin Liu
2025-07-24  4:05     ` Hangbin Liu
2025-07-24  4:12       ` Hangbin Liu
2025-07-25  8:27         ` Petr Machata
2025-07-25 12:53           ` 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).