[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aIN8Rpc8YELX2QD6@fedora>
Date: Fri, 25 Jul 2025 12:46:00 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: Nikolay Aleksandrov <razor@...ckwall.org>
Cc: netdev@...r.kernel.org, Jay Vosburgh <jv@...sburgh.net>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Shuah Khan <shuah@...nel.org>,
Jonathan Corbet <corbet@....net>, Petr Machata <petrm@...dia.com>,
Amit Cohen <amcohen@...dia.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Alessandro Zanni <alessandro.zanni87@...il.com>,
linux-doc@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 1/2] bonding: send LACPDUs periodically in passive
mode after receiving partner's LACPDU
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
Powered by blists - more mailing lists