[openib-general] [PATCH] OpenSM: Workaround for IBM eHCA logical switch partition enforcement

Hal Rosenstock halr at voltaire.com
Thu Nov 3 05:47:40 PST 2005


OpenSM: Workaround for IBM eHCA logical switch partition enforcement

The problem is that the eHCA logical switches do not support partition 
enforcement. This *should* be reflected by a zero value in the 
PartitionEnforcementCap component of the switchinfo attribute.  The IBM 
firmware bug is that it returns a one rather than a zero in this field.
However, when subsequent requests to the switch port are received for
the P_KeyTable, the firmware drops them on the floor and opensm thrashes
timing out all the get P_KeyTable MADs it issues for all of the ports on
the two logical switches.

Remainder of patch supplied by Brad Benton <brad.benton at us.ibm.com>

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: osm_port_info_rcv.c
===================================================================
--- osm_port_info_rcv.c	(revision 3959)
+++ osm_port_info_rcv.c	(working copy)
@@ -416,6 +416,7 @@ __osm_pi_rcv_process_router_port(
   OSM_LOG_EXIT( p_rcv->p_log );
 }
 
+#define IBM_VENDOR_ID  (0x5076)
 /**********************************************************************
  **********************************************************************/
 void osm_pkey_get_tables(
@@ -431,6 +432,7 @@ void osm_pkey_get_tables(
   uint8_t  port_num;
   uint16_t block_num, max_blocks;
   uint32_t attr_mod_ho;
+  uint32_t vendor_id;
   osm_switch_t* p_switch;
 
   OSM_LOG_ENTER( p_log, osm_physp_has_pkey );
@@ -468,7 +470,12 @@ void osm_pkey_get_tables(
       goto Exit;
     }
 
-    /* bail out if this is a switch with no partition enforcement capability */
+    /* Check for IBM eHCA firmware defect in reporting partition enforcement cap */
+    vendor_id = cl_ntoh32(ib_node_info_get_vendor_id( &p_node->node_info));
+    if (vendor_id == IBM_VENDOR_ID && cl_ntoh16(p_switch->switch_info.enforce_cap) == 1)
+      p_switch->switch_info.enforce_cap = 0;
+
+    /* Bail out if this is a switch with no partition enforcement capability */
     if (cl_ntoh16(p_switch->switch_info.enforce_cap) == 0)
       goto Exit;
 






More information about the general mailing list