From: Leon Romanovsky <leon@kernel.org>
To: Stephen Hemminger <stephen@networkplumber.org>,
David Ahern <dsahern@gmail.com>
Cc: Leon Romanovsky <leonro@nvidia.com>,
Doug Ledford <dledford@redhat.com>,
Jason Gunthorpe <jgg@nvidia.com>,
linux-netdev <netdev@vger.kernel.org>,
RDMA mailing list <linux-rdma@vger.kernel.org>
Subject: [PATCH iproute2-rc] rdma: Fix owner name for the kernel resources
Date: Tue, 11 Aug 2020 09:33:04 +0300 [thread overview]
Message-ID: <20200811063304.581395-1-leon@kernel.org> (raw)
From: Leon Romanovsky <leonro@nvidia.com>
Owner of kernel resources is printed in different format than user
resources to easy with the reader by simply looking on the name.
The kernel owner will have "[ ]" around the name.
Before this change:
[leonro@vm ~]$ rdma res show qp
link rocep0s9/1 lqpn 1 type GSI state RTS sq-psn 58 comm ib_core
After this change:
[leonro@vm ~]$ rdma res show qp
link rocep0s9/1 lqpn 1 type GSI state RTS sq-psn 58 comm [ib_core]
Fixes: b0a688a542cd ("rdma: Rewrite custom JSON and prints logic to use common API")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
rdma/res.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rdma/res.c b/rdma/res.c
index c99a1fcb..6eca87e5 100644
--- a/rdma/res.c
+++ b/rdma/res.c
@@ -161,7 +161,7 @@ void print_comm(struct rd *rd, const char *str, struct nlattr **nla_line)
snprintf(tmp, sizeof(tmp), "%s", str);
else
snprintf(tmp, sizeof(tmp), "[%s]", str);
- print_color_string(PRINT_ANY, COLOR_NONE, "comm", "comm %s ", str);
+ print_color_string(PRINT_ANY, COLOR_NONE, "comm", "comm %s ", tmp);
}
void print_dev(struct rd *rd, uint32_t idx, const char *name)
--
2.26.2
next reply other threads:[~2020-08-11 6:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-11 6:33 Leon Romanovsky [this message]
2020-08-11 7:25 ` [PATCH iproute2-rc] rdma: Fix owner name for the kernel resources Leon Romanovsky
2020-08-11 15:54 ` Stephen Hemminger
2020-08-11 16:53 ` Leon Romanovsky
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=20200811063304.581395-1-leon@kernel.org \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=dsahern@gmail.com \
--cc=jgg@nvidia.com \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.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).