[ofa-general] [PATCH] Fix regexp's for new ibnetdiscover output

Hal Rosenstock hal.rosenstock at gmail.com
Mon Sep 10 11:20:43 PDT 2007


On 9/10/07, Ira Weiny <weiny2 at llnl.gov> wrote:
> On Mon, 10 Sep 2007 13:03:51 -0400
> "Hal Rosenstock" <hal.rosenstock at gmail.com> wrote:
>
> > On 9/10/07, Ira Weiny <weiny2 at llnl.gov> wrote:
> > > I don't see this format change in the 1.2 ibnetdiscover.  Is version tag 1.2.4
> > > going to go into 1.2?

Looks like the version in OFED 1.2 says:
ibnetdiscover -V
ibnetdiscover: BUILD VERSION 1.2.1

> > > Your email made me search for the change and the commit
> > > ID is : f242dfb98c7ea73cbe8503061e28e6792c6a6e34
> >
> > Can you elaborate on the format difference ? Thanks.
> >
>
> From the _new_ man page:
>
>   PortGUIDs are shown in parentheses ().  For switches, this is shown on the
>   switchguid line.  For CA and router ports, it is shown on the connectivity
>   lines.
>
> From the patch I found:
>
> -[22]    "H-0008f10403961354"[1]         # "MT23108 InfiniHost Mellanox Technologies" lid 4 4
> +[22]    "H-0008f10403961354"[1](8f10403961355)         # "MT23108 InfiniHost Mellanox Techno
>
> The addition of the GUID in parens caused my regexp to fail.  I am thinking of
> changing the scripts to look for the ibnetdiscover version reported with the
> -V.  However, since these tools are kept in the same package it should be ok to
> simply ensure they are kept in sync.  What do you think?

If a format version needed to be determined, it could be done via -V
and parsed accordingly but a better way would be to actually stick on
in the output file as a comment.

IMO the latter should be fine (keeping ibnetdiscover and script in
sync). It was just something missed to be updated in the script when
that format change was made.

The former would only be needed if mixing and matching formats and
tools. Is that needed ?

-- Hal

> Ira
>



More information about the general mailing list