netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Nikolay Aleksandrov <razor@blackwall.org>,
	netdev@vger.kernel.org, Jay Vosburgh <jv@jvosburgh.net>,
	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>,
	Simon Horman <horms@kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	David Ahern <dsahern@gmail.com>,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next] bonding: show master index when dumping slave info
Date: Sat, 18 Oct 2025 09:52:49 +0000	[thread overview]
Message-ID: <aPNjcWo8G3tTpin0@fedora> (raw)
In-Reply-To: <7quap7umeeksodg62bbv4ob4344edplb7f33yiebs2hvhrrdvf@wndrzz7rxi7v>

On Fri, Oct 17, 2025 at 11:56:55AM +0200, Jiri Pirko wrote:
> Fri, Oct 17, 2025 at 08:10:09AM +0200, razor@blackwall.org wrote:
> >On 10/17/25 06:03, Hangbin Liu wrote:
> >> Currently, there is no straightforward way to obtain the master/slave
> >> relationship via netlink. Users have to retrieve all slaves through sysfs
> >> to determine these relationships.
> >> 
> >
> >How about IFLA_MASTER? Why not use that?
> 
> It's been there for a decade. Plus is, it exposes master for all
> slave-master devices. Odd that you missed it.

Once, I wanted to find the slaves from a master interface but couldn’t. So I
added it to my to-do list. Later, I noticed that the master information was
already available in the slave, but I forgot about it after long time.
Recently, when I reviewed my to-do list, I realized that printing all slaves
from the master interface seemed impractical. So I tried to list the master
information in the slave again — and forgot about IFLA_MASTER...

Hangbin

      reply	other threads:[~2025-10-18  9:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  3:03 [PATCH net-next] bonding: show master index when dumping slave info Hangbin Liu
2025-10-17  3:05 ` [PATCH iproute2-next] bond: slave: print master name Hangbin Liu
2025-10-18  8:57   ` Stephen Hemminger
2025-10-17  6:10 ` [PATCH net-next] bonding: show master index when dumping slave info Nikolay Aleksandrov
2025-10-17  7:26   ` Hangbin Liu
2025-10-17  9:56   ` Jiri Pirko
2025-10-18  9:52     ` Hangbin Liu [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=aPNjcWo8G3tTpin0@fedora \
    --to=liuhangbin@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=stephen@networkplumber.org \
    /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).