[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19207.1649778011@famine>
Date: Tue, 12 Apr 2022 08:40:11 -0700
From: Jay Vosburgh <jay.vosburgh@...onical.com>
To: Hangbin Liu <liuhangbin@...il.com>
cc: netdev@...r.kernel.org, Veaceslav Falico <vfalico@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
David Ahern <dsahern@...il.com>,
Nikolay Aleksandrov <nikolay@...dia.com>,
Jonathan Toppins <jtoppins@...hat.com>,
Eric Dumazet <eric.dumazet@...il.com>,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next] Bonding: add per port priority support
Hangbin Liu <liuhangbin@...il.com> wrote:
>On Mon, Apr 11, 2022 at 09:55:45PM -0700, Jay Vosburgh wrote:
>> Hangbin Liu <liuhangbin@...il.com> wrote:
>>
>> >Add per port priority support for bonding. A higher number means higher
>> >priority. The primary slave still has the highest priority. This option
>> >also follows the primary_reselect rules.
>>
>> The above description (and the Subject) should mention that this
>> apparently refers to priority in interface selection during failover
>> events.
>
>OK, will update it. How about:
>
>Bonding: add per port priority for current slave re-selection during failover
That would be better, but something like "add per-port priority
for failover re-selection" would be a bit shorter.
>Add per port priority support for bonding current re-selection during failover.
>A higher number means higher priority in selection. The primary slave still
>has the highest priority. This option also follows the primary_reselect rules.
This seems reasonable.
>> >@@ -117,6 +121,7 @@ static const struct nla_policy bond_policy[IFLA_BOND_MAX + 1] = {
>> >
>> > static const struct nla_policy bond_slave_policy[IFLA_BOND_SLAVE_MAX + 1] = {
>> > [IFLA_BOND_SLAVE_QUEUE_ID] = { .type = NLA_U16 },
>> >+ [IFLA_BOND_SLAVE_PRIO] = { .type = NLA_S32 },
>>
>> Why used signed instead of unsigned?
>>
>> Regardless, the valid range for the prio value should be
>> documented.
>
>I did this in purpose as team also use singed number. User could use a
>negative number for a specific link while other links keep using default 0.
Fair enough; I had been comparing to the LACP port priority and
route metric, both of which are unsigned.
>BTW, how to document the valid ranger for a int number, -2^31 ~ 2^31-1 or
>INT_MIN ~ INT_MAX.
The documentation can simply state that the value is a signed 32
bit integer (rather than giving the specifics).
-J
---
-Jay Vosburgh, jay.vosburgh@...onical.com
Powered by blists - more mailing lists