[ofa-general] saquery port problems

Matthias Blankenhaus matthias at sgi.com
Wed May 21 16:48:28 PDT 2008


I have a patch that fixes the problem:

diff -Narpu infiniband-diags-1.3.6.vanilla/src/saquery.c my/src/saquery.c
--- infiniband-diags-1.3.6.vanilla/src/saquery.c        2008-02-28 
00:58:36.000000000 -0800
+++ my/src/saquery.c    2008-05-21 16:08:19.583221794 -0700
@@ -1304,13 +1304,13 @@ get_bind_handle(void)
                        ca_name_index++;
                if (sa_port_num && sa_port_num != attr_array[i].port_num)
                        continue;
-               if (sa_hca_name && i == 0)
-                       continue;
                if (sa_hca_name
                 && strcmp(sa_hca_name, vendor->ca_names[ca_name_index]) != 0)
                        continue;
-               if (attr_array[i].link_state == IB_LINK_ACTIVE)
+               if (attr_array[i].link_state == IB_LINK_ACTIVE) {
                        port_guid = attr_array[i].port_guid;
+                       break;
+                }
        }


I have tested it and it solves the problem.

Does this look ok ?

Matthias



On Tue, 20 May 2008, Matthias Blankenhaus wrote:

> Forgot some important info:
> 
> saquery BUILD VERSION: 1.3.6
> OFED-1.3
> 
> 
> On Tue, 20 May 2008, Matthias Blankenhaus wrote:
> 
> > Howdy !
> > 
> > While using this tool to run some queries on a two port HCA, I noticed 
> > some odd behavior.  Here are my observations running on a SLES10SP2 
> > (x86_64) Intel Xeon with a Mellanox Technologies MT25208 InfiniHost III 
> > Ex HCA:
> > 
> > (01) saquery -C mthca0 -m  
> >      This yields the output for port number two.  This is not conform with the
> >      usual ib tools behavior to report on port one per default.
> > 
> > (02) saquery -C mthca0 -m -P 1
> >      Fails with "Failed to find active port, check port status with "ibstat".
> >      This is incorrect, since
> > 
> >      # ibstat mthca0 1
> > CA: 'mthca0'
> > Port 1:
> > State: Active
> > Physical state: LinkUp
> > Rate: 20
> > Base lid: 5
> > LMC: 0
> > SM lid: 1
> > Capability mask: 0x02510a68
> > Port GUID: 0x0008f10403987dc5
> > 
> >      This might be the reason why (01) report on port two.
> > 
> > (03) saquery -C mthca0 -m -P 2
> >      Works and is identical with the out out from (01).
> > 
> > However, the following command options work:
> > 
> > (04) saquery -P 1 -m
> >      Correctly yields the output for port one.  In other words
> >      port one seems to be fine unlike reported in (02).
> > 
> > (05) saquery -P 2 -m
> >      Correctly yields the output for port two.
> > 
> > 
> > Is it incorrect to use -C and -P in combination ?  Why does does
> > saquery think that port one is not active ?
> > 
> > 
> > Thanx,
> > Matthias
> > _______________________________________________
> > general mailing list
> > general at lists.openfabrics.org
> > http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> > 
> > To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> > 
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 



More information about the general mailing list