]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
openib: modify check for link_layer to handle unspecified
authorArlin Davis <arlin.r.davis@intel.com>
Tue, 2 Sep 2014 15:47:29 +0000 (08:47 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Tue, 2 Sep 2014 15:47:29 +0000 (08:47 -0700)
Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
dapl/openib_common/util.c

index 6e8597d4877cd772933f2f5e3b2682687b3523dd..a34d7d9e8b3835ed52614efc7503583fc0ad27a5 100644 (file)
@@ -468,12 +468,13 @@ skip_ib:
 
 #ifdef DEFINE_ATTR_LINK_LAYER
 #ifndef _OPENIB_CMA_
-               if (port_attr.link_layer == IBV_LINK_LAYER_ETHERNET)
+               if (port_attr.link_layer != IBV_LINK_LAYER_INFINIBAND &&
+                   port_attr.link_layer != IBV_LINK_LAYER_UNSPECIFIED)
                        hca_ptr->ib_trans.global = 1;
 
                dapl_log(DAPL_DBG_TYPE_UTIL,
-                        " query_hca: port.link_layer = 0x%x\n", 
-                        port_attr.link_layer);
+                        " query_hca: port.link_layer = 0x%x, global = %d\n",
+                        port_attr.link_layer, hca_ptr->ib_trans.global);
 #endif
 #endif
 
@@ -487,9 +488,10 @@ skip_ib:
                         port_attr.transport, hca_ptr->ib_trans.global);
 #endif
 #endif
+
                dapl_log(DAPL_DBG_TYPE_UTIL,
                             " query_hca: (%x.%x) eps %d, sz %d evds %d,"
-                            " sz %d mtu %d - pkey %x p_idx %d sl %d\n",
+                            " sz %d mtu %d - pkey %x p_idx %d sl %d gl %d\n",
                             ia_attr->hardware_version_major,
                             ia_attr->hardware_version_minor,
                             ia_attr->max_eps, ia_attr->max_dto_per_ep,
@@ -497,7 +499,7 @@ skip_ib:
                             128 << hca_ptr->ib_trans.mtu,
                             ntohs(hca_ptr->ib_trans.pkey),
                             hca_ptr->ib_trans.pkey_idx,
-                            hca_ptr->ib_trans.sl);
+                            hca_ptr->ib_trans.sl, hca_ptr->ib_trans.global);
 
                dapl_log(DAPL_DBG_TYPE_UTIL,
                             " query_hca: msg %llu rdma %llu iov %d lmr %d rmr %d"