From: Hangbin Liu <liuhangbin@gmail.com>
To: Nikolay Aleksandrov <razor@blackwall.org>
Cc: netdev@vger.kernel.org, Jay Vosburgh <jv@jvosburgh.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
Jonathan Corbet <corbet@lwn.net>, Petr Machata <petrm@nvidia.com>,
Amit Cohen <amcohen@nvidia.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Alessandro Zanni <alessandro.zanni87@gmail.com>,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] bonding: send LACPDUs periodically in passive mode after receiving partner's LACPDU
Date: Fri, 25 Jul 2025 12:46:00 +0000 [thread overview]
Message-ID: <aIN8Rpc8YELX2QD6@fedora> (raw)
In-Reply-To: <367f9bbb-537b-4828-b8c8-cfc9d8ca8c2c@blackwall.org>
On Fri, Jul 25, 2025 at 11:49:00AM +0300, Nikolay Aleksandrov wrote:
> On 7/25/25 09:28, Hangbin Liu wrote:
> > When `lacp_active` is set to `off`, the bond operates in passive mode, meaning
> > it only "speaks when spoken to." However, the current kernel implementation
> > only sends an LACPDU in response when the partner's state changes.
> >
> > As a result, once LACP negotiation succeeds, the actor stops sending LACPDUs
> > until the partner times out and sends an "expired" LACPDU. This causes
> > continuous LACP state flapping.
> >
> > According to IEEE 802.1AX-2014, 6.4.13 Periodic Transmission machine. The
> > values of Partner_Oper_Port_State.LACP_Activity and
> > Actor_Oper_Port_State.LACP_Activity determine whether periodic transmissions
> > take place. If either or both parameters are set to Active LACP, then periodic
> > transmissions occur; if both are set to Passive LACP, then periodic
> > transmissions do not occur.
> >
> > To comply with this, we remove the `!bond->params.lacp_active` check in
> > `ad_periodic_machine()`. Instead, we initialize the actor's port's
> > `LACP_STATE_LACP_ACTIVITY` state based on `lacp_active` setting.
> >
> > Additionally, we avoid setting the partner's state to
> > `LACP_STATE_LACP_ACTIVITY` in the EXPIRED state, since we should not assume
> > the partner is active by default.
> >
> > This ensures that in passive mode, the bond starts sending periodic LACPDUs
> > after receiving one from the partner, and avoids flapping due to inactivity.
> >
> > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
>
> Shouldn't the fixes tag be lacp_active commit id?
> E.g. 3a755cd8b7c6 ("bonding: add new option lacp_active")
Totally forgot that I added this option -_-!!
Thanks
Hangbin
next prev parent reply other threads:[~2025-07-25 12:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aIN8Rpc8YELX2QD6@fedora \
--to=liuhangbin@gmail.com \
--cc=alessandro.zanni87@gmail.com \
--cc=amcohen@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=razor@blackwall.org \
--cc=shuah@kernel.org \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox