From: Stephen Hemminger <stephen@networkplumber.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: 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>, David Ahern <dsahern@gmail.com>,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH iproute2-next] bond: slave: print master name
Date: Sat, 18 Oct 2025 01:57:22 -0700 [thread overview]
Message-ID: <20251018015722.1df7f4a6@phoenix.lan> (raw)
In-Reply-To: <20251017030509.61794-1-liuhangbin@gmail.com>
On Fri, 17 Oct 2025 03:05:09 +0000
Hangbin Liu <liuhangbin@gmail.com> wrote:
> diff --git a/ip/iplink_bond_slave.c b/ip/iplink_bond_slave.c
> index c88100e248dd..55deaadf5fe2 100644
> --- a/ip/iplink_bond_slave.c
> +++ b/ip/iplink_bond_slave.c
> @@ -92,6 +92,17 @@ static void bond_slave_print_opt(struct link_util *lu, FILE *f, struct rtattr *t
> if (!tb)
> return;
>
> + if (tb[IFLA_BOND_SLAVE_MASTER]) {
> + unsigned int ifindex = rta_getattr_u32(tb[IFLA_BOND_SLAVE_MASTER]);
> +
> + if (ifindex) {
> + print_string(PRINT_ANY,
> + "master",
> + "master %s ",
> + ll_index_to_name(ifindex));
> + }
> + }
You should use print_color_string(PRINT_ANY, COLOR_IFNAME, ...) here
next prev parent reply other threads:[~2025-10-18 1:18 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 [this message]
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
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=20251018015722.1df7f4a6@phoenix.lan \
--to=stephen@networkplumber.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).