[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2163293.1751571770@vermin>
Date: Thu, 03 Jul 2025 12:42:50 -0700
From: Jay Vosburgh <jv@...sburgh.net>
To: Hangbin Liu <liuhangbin@...il.com>
cc: 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>, Jiri Pirko <jiri@...nulli.us>,
netdev@...r.kernel.org
Subject: Re: [Bonding Draft Proposal] Add lacp_prio Support for ad_select?
Hangbin Liu <liuhangbin@...il.com> wrote:
>Hi Jay,
>On Tue, Jul 01, 2025 at 10:08:56AM -0700, Jay Vosburgh wrote:
>> It looks like lacp_find_new_agg_lead() runs though all of the
>> ports in all of the aggregators and chooses the aggregator with the
>> "best" port of all.
>
>Yes, based on the ad_select policy.
>
>>
>> One downside if we were to adapt this logic or something similar
>> to bonding is that there's currently no way to set the Port Priority of
>> interfaces in the bond. There is a "prio" that can be set via ip set
>> ... type bond_slave prio X, which is IFLA_BOND_SLAVE_PRIO, but that's a
>> failover priority, not the LACP Port Priority.
>
>How about adding a similar parameter, e.g., ad_actor_port_prio?
>Currently, the actor port priority is initialized directly as 0xFF.
>We could introduce a per-port ad_actor_port_prio to be used in the
>ad_select policy.
This is an easy choice, we should be able to adjust the Port
Priority on a per-interface basis. At the moment, we don't use it for
anything, but that may change.
>I understand that, according to the IEEE standard, port priority is used to
>select the best port among multiple ports within a single aggregator.
>However, since the IEEE standard doesn't define how to select between two
>aggregators, we could repurpose this value similarly to how the bandwidth
>and count options work in the current ad_select policy.
Well, one specific use is in Annex C.3 (of 802.1AX-2014), for
use in cases where an aggregator can accomodate N active ports, but
there are N+X ports that are available to that aggregator. In this
case, the Port Priority can be used to select the "best" subset of the
available ports. I recall there's some more detailed verbiage along
these same lines somewhere else in the standard, but it's eluding me at
the moment.
But, yes, we could in principle say something like "the best
aggregator is the one with the higher total sum of Port Priorities
across its active ports." I'm not sure right offhand if that's the best
algorithm, but I'm fairly sure it's legal from the standard's point of
view.
-J
>>
>> So right now, if the above logic were put into bonding, the
>> local selection criteria would end up based entirely on the port number,
>> which isn't configurable, and so doesn't seem especially better than
>> what we have now.
>
>[...]
>>
>> From the above, I suspect we'll have to add some additional
>> configuration parameters somewhere. It would be nice if the System
>> Priority were configurable on a per-aggregator basis, but that seems
>> complicated from a UI perspective (other than something like a mapping
>> of agg ID to system prio).
>
>Thanks
>Hangbin
---
-Jay Vosburgh, jv@...sburgh.net
Powered by blists - more mailing lists