Subject: Re: [PATCH net-next v6] bonding: Add independent control state machine

From: Jay Vosburgh <[email-masked]>
Date: Thu, 01 Feb 2024 06:43:25 -0800

Paolo Abeni <[email-masked]> wrote:

>On Mon, 2024-01-29 at 20:27 +0000, Aahil Awatramani wrote:
>> Add support for the independent control state machine per IEEE
>> 802.1AX-2008 5.4.15 in addition to the existing implementation of the
>> coupled control state machine.
>> 
>> Introduces two new states, AD_MUX_COLLECTING and AD_MUX_DISTRIBUTING in
>> the LACP MUX state machine for separated handling of an initial
>> Collecting state before the Collecting and Distributing state. This
>> enables a port to be in a state where it can receive incoming packets
>> while not still distributing. This is useful for reducing packet loss when
>> a port begins distributing before its partner is able to collect.
>
>If I read the code correctly, the transition
>AD_MUX_COLLECTING_DISTRIBUTING -> AD_MUX_DISTRIBUTING is not possible,
>am I correct?

	That's correct.  There are two completely separate state
machines in the 2008 standard, one for coupled control and one for
independent control.  The state machines utilize the same states other
than COLLECTING_DISTRIBUTING in the coupled control mode, and COLLECTING
and DISTRIBUTING in the independent control mode.

	Essentially, the two machines differ in the transition out from
ATTACHED state; coupled control moves to COLLECTING_DISTRIBUTING,
whereas independent control moves to COLLECTING then DISTRIBUTING.  

	The 2020 edition of the standard combines the two state machines
into one, and changes the set of states.  Bonding does not implement
this version of the standard.

	-J

---
	-Jay Vosburgh, [email-masked]