[openib-general] [PATCH] OpenSM/osm_sa_path_record.c: Support SL in PathRecord requests based on whether or not QoS is enabled

Hal Rosenstock halr at voltaire.com
Mon Jul 10 08:37:45 PDT 2006


OpenSM/osm_sa_path_record.c: Support SL in PathRecord requests based on
whether or not QoS is enabled

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

Index: opensm/osm_sa_path_record.c
===================================================================
--- opensm/osm_sa_path_record.c	(revision 8470)
+++ opensm/osm_sa_path_record.c	(working copy)
@@ -548,7 +548,10 @@ __osm_pr_rcv_get_path_parms(
   p_parms->mtu = mtu;
   p_parms->rate = rate;
   p_parms->pkt_life = pkt_life;
-  p_parms->sl = OSM_DEFAULT_SL;
+  if ( comp_mask & IB_PR_COMPMASK_SL )
+    p_parms->sl = ib_path_rec_sl( p_pr );
+  else
+    p_parms->sl = OSM_DEFAULT_SL;
 
   if( comp_mask & IB_PR_COMPMASK_RAWTRAFFIC &&
       cl_ntoh32( p_pr->hop_flow_raw ) & ( 1<<31 ) )
@@ -987,15 +990,19 @@ __osm_pr_rcv_get_end_points(
     into the endpoints.
   */
 
-  if( comp_mask & IB_PR_COMPMASK_SL )
+  /* Check for default SL only if QoS not enabled */
+  if ( p_rcv->p_subn->opt.no_qos )
   {
-    if( p_pr->sl != OSM_DEFAULT_SL )
+    if( comp_mask & IB_PR_COMPMASK_SL )
     {
-      if ( p_sa_mad->method == IB_MAD_METHOD_GET )
-        sa_status = IB_SA_MAD_STATUS_NO_RECORDS;
-      *pp_src_port = 0;
-      *pp_dest_port = 0;
-      goto Exit;
+      if( ib_path_rec_sl( p_pr ) != OSM_DEFAULT_SL )
+      {
+        if ( p_sa_mad->method == IB_MAD_METHOD_GET )
+          sa_status = IB_SA_MAD_STATUS_NO_RECORDS;
+        *pp_src_port = 0;
+        *pp_dest_port = 0;
+        goto Exit;
+      }
     }
   }
 
@@ -1414,7 +1421,7 @@ __osm_pr_match_mgrp_attributes(
 
   if( comp_mask & IB_PR_COMPMASK_SL )
   {
-    if( ( p_pr->sl & 0xf ) != sl )
+    if( ib_path_rec_sl( p_pr ) != sl )
       goto Exit;
   }
 







More information about the general mailing list