[openib-general] [PATCH] OpenSM: In osm_mcmr_query_mgrp, set exactly selectors in MCMemberRecord response

Hal Rosenstock halr at voltaire.com
Mon Feb 21 05:56:52 PST 2005


OpenSM: In osm_mcmr_query_mgrp, set exactly selectors in MCMemberRecord
response

Index: osm_sa_mcmember_record.c
===================================================================
--- osm_sa_mcmember_record.c	(revision 1844)
+++ osm_sa_mcmember_record.c	(working copy)
@@ -1696,9 +1696,6 @@
   p_resp_sa_mad->attr_offset =
     ib_get_attr_offset( sizeof(ib_member_rec_t) );
 
-  p_resp_rec = (ib_member_rec_t*)
-    ib_sa_mad_get_payload_ptr( p_resp_sa_mad );
-
 #ifndef VENDOR_RMPP_SUPPORT
   /* we support only one packet RMPP - so we will set the first and
      last flags for gettable */
@@ -1713,7 +1710,9 @@
     p_resp_sa_mad->rmpp_flags = IB_RMPP_FLAG_ACTIVE;
 #endif
 
-    /*
+  p_resp_rec = (ib_member_rec_t*)ib_sa_mad_get_payload_ptr( p_resp_sa_mad );
+
+  /*
     p819 - The PortGID, JoinState and ProxyJoin shall be zero, 
     except in the case of a trusted request. 
     Note: In the mad controller we check that the SM_Key received on
@@ -1730,6 +1729,10 @@
     if (i < num_rec)
     {
       *p_resp_rec = p_rec_item->rec;
+      /* Fill in the mtu, rate, and packet lifetime selectors */
+      p_resp_rec->mtu |= 2<<6; /* exactly */
+      p_resp_rec->rate |= 2<<6; /* exactly */
+      p_resp_rec->pkt_life |= 2<<6; /* exactly */
       if (trusted_req == FALSE)
       {
         cl_memclr(&p_resp_rec->port_gid, sizeof(ib_gid_t));






More information about the general mailing list