netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <jv@jvosburgh.net>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>, Petr Machata <petrm@nvidia.com>,
	Amit Cohen <amcohen@nvidia.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	David Ahern <dsahern@gmail.com>,
	Jonas Gorski <jonas.gorski@gmail.com>,
	linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCHv4 iproute2-next] iplink: bond_slave: add support for actor_port_prio
Date: Fri, 29 Aug 2025 17:22:36 -0700	[thread overview]
Message-ID: <2030137.1756513356@famine> (raw)
In-Reply-To: <aLD8l9xPd2nnl_gt@fedora>

Hangbin Liu <liuhangbin@gmail.com> wrote:

>On Thu, Aug 28, 2025 at 09:59:20AM -0700, Jay Vosburgh wrote:
>> Hangbin Liu <liuhangbin@gmail.com> wrote:
>> 
>> >On Wed, Aug 27, 2025 at 11:43:19AM -0700, Jay Vosburgh wrote:
>> >> Hangbin Liu <liuhangbin@gmail.com> wrote:
>> >> 
>> >> >Add support for the actor_port_prio option for bond slaves.
>> >> >This per-port priority can be used by the bonding driver in ad_select to
>> >> >choose the higher-priority aggregator during failover.
>> >> >
>> >> >Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
>> >> >---
>> >> >v4: no update
>> >> >v3: rename ad_actor_port_prio to actor_port_prio
>> >> >v2: no update
>> >> >---
>> >> > ip/iplink_bond.c       |  1 +
>> >> > ip/iplink_bond_slave.c | 18 ++++++++++++++++--
>> >> > man/man8/ip-link.8.in  |  6 ++++++
>> >> > 3 files changed, 23 insertions(+), 2 deletions(-)
>> >> >
>> >> >diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
>> >> >index d6960f6d9b03..1a2c1b3042a0 100644
>> >> >--- a/ip/iplink_bond.c
>> >> >+++ b/ip/iplink_bond.c
>> >> >@@ -91,6 +91,7 @@ static const char *ad_select_tbl[] = {
>> >> > 	"stable",
>> >> > 	"bandwidth",
>> >> > 	"count",
>> >> >+	"prio",
>> >> 
>> >> 	Should this be actor_port_prio?
>> >
>> >hmm, actor_port_prio correspond to the ip link option name, which is also
>> >acceptable.
>> 
>> 	Isn't this the text of the ip link option name right here (in
>> the sense of what goes on the "ip link" command line)?
>
>"stable", "bandwidth", "count" are not ip link parameters, and same with
>kernel names, so I also used the kernel name "prio" here.

	Perhaps I wasn't explaining sufficiently; I mean that the text
in ad_select_tbl[] is where the name of the option settings comes from
for ip link whatever commands.  E.g., If I do something like

ip link add dev bond0 type bond [...] ad_select rutabaga

	The "rutabaga" text is being compared to the elements of
ad_select_tbl[], correct?

	Anyway, what I meant is that I think setting this new priority
option should look something like:

ip link add dev bond0 type bond [...] ad_select actor_port_prio

	So that it's called the same thing everwhere, and it matches the
nomenclature used in the standard.

	-J

>> >While in kernel, we defined the select policy as
>> >
>> >        { "stable",    BOND_AD_STABLE,    BOND_VALFLAG_DEFAULT},
>> >        { "bandwidth", BOND_AD_BANDWIDTH, 0},
>> >        { "count",     BOND_AD_COUNT,     0},
>> >+       { "prio",      BOND_AD_PRIO,      0},
>> 
>> 	Maybe my memory is starting to go, but I thought in a prior
>> discussion we'd agreed to change this as well for consistency.
>
>Maybe I didn't get your comment[1] correctly. I only changed
>`ad_actor_port_prio` to `actor_port_prio` last time.
>
>> 
>> >So I think the prio here should also be OK.
>> >
>> >You can decide which one to use.
>> 
>> 	I would prefer that the two options have discrete names, or,
>> really, that we not repeat "prio" as it's already used elsewhere.  Plus,
>> who knows, maybe in the future we'll have another priority option.
>
>OK, do not use same name for different usage. I will also change the "prio"
>to "actor_port_prio" in next patch.
>
>[1] https://lore.kernel.org/netdev/1109153.1755380673@famine/
>
>Thanks
>Hangbin

---
	-Jay Vosburgh, jv@jvosburgh.net

      reply	other threads:[~2025-08-30  0:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-25  7:05 [PATCHv4 iproute2-next] iplink: bond_slave: add support for actor_port_prio Hangbin Liu
2025-08-27 18:43 ` Jay Vosburgh
2025-08-28  3:24   ` Hangbin Liu
2025-08-28 16:59     ` Jay Vosburgh
2025-08-29  1:04       ` Hangbin Liu
2025-08-30  0:22         ` Jay Vosburgh [this message]

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=2030137.1756513356@famine \
    --to=jv@jvosburgh.net \
    --cc=amcohen@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jonas.gorski@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vladimir.oltean@nxp.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).