All of lore.kernel.org
 help / color / mirror / Atom feed
From: Parav Pandit <parav@mellanox.com>
To: Jason Gunthorpe <jgg@mellanox.com>,
	Devesh Sharma <devesh.sharma@broadcom.com>
Cc: linux-rdma <linux-rdma@vger.kernel.org>,
	Leon Romanovsky <leon@kernel.org>
Subject: RE: [PATCH v5] libibverbs: display gid type in ibv_devinfo
Date: Tue, 4 Feb 2020 04:27:45 +0000	[thread overview]
Message-ID: <AM0PR05MB486694589EA1CBC66F598066D1030@AM0PR05MB4866.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20200203180405.GR23346@mellanox.com>



> From: Jason Gunthorpe <jgg@mellanox.com>
> Sent: Monday, February 3, 2020 11:34 PM
> 
> On Mon, Feb 03, 2020 at 11:31:06PM +0530, Devesh Sharma wrote:
> > On Mon, Feb 3, 2020 at 11:23 PM Jason Gunthorpe <jgg@mellanox.com>
> wrote:
> > >
> > > On Mon, Feb 03, 2020 at 12:52:04PM -0500, Devesh Sharma wrote:
> > > > It becomes difficult to make out from the output of ibv_devinfo if
> > > > a particular gid index is RoCE v2 or not.
> > > >
> > > > Adding a string to the output of ibv_devinfo -v to display the gid
> > > > type at the end of gid.
> > > >
> > > > The output would look something like below:
> > > > $ ibv_devinfo -v -d bnxt_re2
> > > > hca_id: bnxt_re2
> > > >  transport:             InfiniBand (0)
> > > >  fw_ver:                216.0.220.0
> > > >  node_guid:             b226:28ff:fed3:b0f0
> > > >  sys_image_guid:        b226:28ff:fed3:b0f0
> > > >   .
> > > >   .
> > > >   .
> > > >   .
> > > >        phys_state:      LINK_UP (5)
> > > >        GID[  0]:               fe80::b226:28ff:fed3:b0f0, IB/RoCE v1
> > > >        GID[  1]:               fe80::b226:28ff:fed3:b0f0, RoCE v2
> > > >        GID[  2]:               ::ffff:192.170.1.101, IB/RoCE v1
> > > >        GID[  3]:               ::ffff:192.170.1.101, RoCE v2
> > >
> > > v1 GIDs are GIDs and should never be formed as IPv6 addreses..
> > So, V1 gids would fall back to old style of display and there will be
> > one more check for gid-type inside the loop...
> 
> Yes
> 
> Parav should we show both the v6 and classic format for a v2 GID? ie
> 
>         GID[  3]:               0000:0000:0000:ffff:xxxx:xxxx:xxxx, RoCE v2
>                                 ::ffff:192.170.1.101
> 
Due to lack of support of GID's netdev, v1/v2 type info in ibv_devinfo output, most users that I know of are using non upstream show_gids script.
So changing format here shouldn't break the existing users scripts.
There may be some scripts that may find this format different.
So I think printing both is likely a more safer option.

> Lets also supress the 'IB/RoCE v1' string on !roce device. IB only has one GID
> type, there is no reason to print anything
> 
> Jason

  parent reply	other threads:[~2020-02-04  4:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 17:52 [PATCH v5] libibverbs: display gid type in ibv_devinfo Devesh Sharma
2020-02-03 17:53 ` Jason Gunthorpe
2020-02-03 18:01   ` Devesh Sharma
2020-02-03 18:04     ` Jason Gunthorpe
2020-02-03 18:09       ` Devesh Sharma
2020-02-04  4:27       ` Parav Pandit [this message]
2020-02-04  5:08         ` Devesh Sharma
2020-02-04  7:17         ` Leon Romanovsky
2020-02-04  7:25           ` Parav Pandit
2020-02-04  8:44             ` Devesh Sharma
2020-02-04  8:50               ` Devesh Sharma
2020-02-03 19:46 ` Leon Romanovsky
2020-02-04  5:07   ` 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=AM0PR05MB486694589EA1CBC66F598066D1030@AM0PR05MB4866.eurprd05.prod.outlook.com \
    --to=parav@mellanox.com \
    --cc=devesh.sharma@broadcom.com \
    --cc=jgg@mellanox.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.