From: Leon Romanovsky <leonro@nvidia.com>
To: Kamal Heib <kheib@redhat.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
<netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH iproute2-next] rdma: Report device protocol
Date: Thu, 4 May 2023 10:48:42 +0300 [thread overview]
Message-ID: <20230504074842.GR525452@unreal> (raw)
In-Reply-To: <20230503210342.66155-1-kheib@redhat.com>
On Wed, May 03, 2023 at 05:03:42PM -0400, Kamal Heib wrote:
> Add support for reporting the device protocol.
>
> $ rdma dev
> 11: mlx5_0: node_type ca proto roce fw 12.28.2006
> node_guid 248a:0703:004b:f094 sys_image_guid 248a:0703:004b:f094
> 12: mlx5_1: node_type ca proto ib fw 12.28.2006
> node_guid 248a:0703:0049:d4f0 sys_image_guid 248a:0703:0049:d4f0
> 13: mlx5_2: node_type ca proto ib fw 12.28.2006
> node_guid 248a:0703:0049:d4f1 sys_image_guid 248a:0703:0049:d4f0
> 17: siw0: node_type rnic proto iw node_guid
> 0200:00ff:fe00:0000 sys_image_guid 0200:00ff:fe00:0000
>
> Signed-off-by: Kamal Heib <kheib@redhat.com>
> ---
> rdma/dev.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/rdma/dev.c b/rdma/dev.c
> index c684dde4a56f..04c2a574405c 100644
> --- a/rdma/dev.c
> +++ b/rdma/dev.c
> @@ -189,6 +189,16 @@ static void dev_print_node_type(struct rd *rd, struct nlattr **tb)
> node_str);
> }
>
> +static void dev_print_dev_proto(struct rd *rd, struct nlattr **tb)
> +{
> + const char *str;
> + if (!tb[RDMA_NLDEV_ATTR_DEV_PROTOCOL])
> + return;
> +
> + str = mnl_attr_get_str(tb[RDMA_NLDEV_ATTR_DEV_PROTOCOL]);
> + print_color_string(PRINT_ANY, COLOR_NONE, "proto", "proto %s ", str);
Please, let's use full word "protocol" and not "proto".
Other than that,
Acked-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2023-05-04 7:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 21:03 [PATCH iproute2-next] rdma: Report device protocol Kamal Heib
2023-05-04 7:48 ` Leon Romanovsky [this message]
2023-05-04 12:01 ` Kamal Heib
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=20230504074842.GR525452@unreal \
--to=leonro@nvidia.com \
--cc=kheib@redhat.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).