netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, Veaceslav Falico <vfalico@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, David Ahern <dsahern@gmail.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	Jonathan Toppins <jtoppins@redhat.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next] Bonding: add per port priority support
Date: Tue, 12 Apr 2022 08:40:11 -0700	[thread overview]
Message-ID: <19207.1649778011@famine> (raw)
In-Reply-To: <YlUViUt0NQfZYgAG@Laptop-X1>

Hangbin Liu <liuhangbin@gmail.com> wrote:

>On Mon, Apr 11, 2022 at 09:55:45PM -0700, Jay Vosburgh wrote:
>> Hangbin Liu <liuhangbin@gmail.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@canonical.com

  reply	other threads:[~2022-04-12 15:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  4:13 [PATCH net-next] Bonding: add per port priority support Hangbin Liu
2022-04-12  4:17 ` [PATCH iproute2-next] iplink: bond_slave: add per port prio support Hangbin Liu
2022-04-14  0:44   ` David Ahern
2022-04-12  4:55 ` [PATCH net-next] Bonding: add per port priority support Jay Vosburgh
2022-04-12  6:00   ` Hangbin Liu
2022-04-12 15:40     ` Jay Vosburgh [this message]
2022-04-12 14:23 ` Jonathan Toppins
2022-04-12 15:55   ` Jay Vosburgh
2022-04-12 17:04     ` Jonathan Toppins
2022-04-13  8:11       ` Hangbin Liu
2022-04-18 10:20     ` Hangbin Liu
2022-04-22 10:23       ` Hangbin Liu
2022-05-06  8:12         ` Hangbin Liu
2022-05-11  3:13           ` Hangbin Liu
2022-05-31  9:26           ` 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=19207.1649778011@famine \
    --to=jay.vosburgh@canonical.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jtoppins@redhat.com \
    --cc=kuba@kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=pabeni@redhat.com \
    --cc=vfalico@gmail.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;
as well as URLs for NNTP newsgroup(s).