From: Jason Gunthorpe <jgg@mellanox.com>
To: Devesh Sharma <devesh.sharma@broadcom.com>
Cc: Mark Bloch <markb@mellanox.com>,
linux-rdma <linux-rdma@vger.kernel.org>,
Leon Romanovsky <leon@kernel.org>
Subject: Re: [PATCH v7] libibverbs: display gid type in ibv_devinfo
Date: Fri, 7 Feb 2020 10:13:39 -0400 [thread overview]
Message-ID: <20200207141339.GD4509@mellanox.com> (raw)
In-Reply-To: <CANjDDBgdX1REcRRKKdqaWNR2Y+Om-Kwb0vm_JuP703m0VLe_6g@mail.gmail.com>
On Fri, Feb 07, 2020 at 06:07:34PM +0530, Devesh Sharma wrote:
> > > -static int print_all_port_gids(struct ibv_context *ctx, uint8_t port_num, int tbl_len)
> > > +#define DEVINFO_INVALID_GID_TYPE 2
> > > +static const char *gid_type_str(enum ibv_gid_type type)
> > > {
> > > + switch (type) {
> > > + case IBV_GID_TYPE_IB_ROCE_V1: return "IB/RoCE v1";
> >
> > You call this function only if link layer is ethernet, why do you need the "IB/" part?
> Jason do you have any suggestion here, "IB/ROCE v1" is the standard
> string rdma-cm and
> /sys/class/infiniband/bnxt_re0/ports/1/gid_attrs/types/* use to
> distinguish v2 gid from v1/IB gids.
I would ignore the sysfs
If you know for sure it is RoCE v1 then say so
IB doesn't have types so it shouldn't show anything
Jason
next prev parent reply other threads:[~2020-02-07 14:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 5:44 [PATCH v7] libibverbs: display gid type in ibv_devinfo Devesh Sharma
2020-02-06 6:08 ` Mark Bloch
2020-02-07 12:37 ` Devesh Sharma
2020-02-07 14:13 ` Jason Gunthorpe [this message]
2020-02-10 17:20 ` Devesh Sharma
2020-02-06 8:38 ` Leon Romanovsky
2020-02-06 9:10 ` Devesh Sharma
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=20200207141339.GD4509@mellanox.com \
--to=jgg@mellanox.com \
--cc=devesh.sharma@broadcom.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=markb@mellanox.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