[openib-general] Re: [PATCH] osm: fix num of blocks of GUIDInfo GetTable query
Hal Rosenstock
halr at voltaire.com
Thu Jun 8 05:54:06 PDT 2006
Hi Eitan,
On Thu, 2006-06-08 at 07:24, Eitan Zahavi wrote:
> Hi Hal
>
> I'm working on passing osmtest check. Found a bug in the new
> GUIDInfoRecord query: If you had a physical port with zero guid_cap
> the code would loop on blocks 0..255 instead of trying the next port.
OK; that's definitely a problem.
> I am still looking for why we might have a guid_cap == 0 on some
> ports.
PortInfo:GuidCap is not used for switch external ports.
> This patch resolves this new problem. osmtest passes on some arbitrary
> networks.
>
> Eitan
>
> Signed-off-by: Eitan Zahavi <eitan at mellanox.co.il>
>
> Index: opensm/osm_sa_guidinfo_record.c
> ===================================================================
> --- opensm/osm_sa_guidinfo_record.c (revision 7703)
> +++ opensm/osm_sa_guidinfo_record.c (working copy)
> @@ -255,6 +255,10 @@ __osm_sa_gir_create_gir(
> continue;
>
> p_pi = osm_physp_get_port_info_ptr( p_physp );
> +
> + if ( p_pi->guid_cap == 0 )
> + continue;
> +
I think the right fix is to detect switch external ports and use the
VLCap from port 0 rather than from the switch external port (unless that
concept is broken in which case it should return 0 records).
-- Hal
> num_blocks = p_pi->guid_cap / 8;
> if ( p_pi->guid_cap % 8 )
> num_blocks++;
>
More information about the general
mailing list