On Mon, Feb 3, 2020 at 11:34 PM Jason Gunthorpe <jgg@xxxxxxxxxxxx> wrote: > > 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@xxxxxxxxxxxx> 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 Sure. > > 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 > > Lets also supress the 'IB/RoCE v1' string on !roce device. IB only has > one GID type, there is no reason to print anything W.r.t. IB devices, this makes sense, While sending v1 I had a thought in mind on IB devices. > > Jason