Update the ib_path_rec_t definition to match the linux counterpart.  This
replaces two adjacent reserved fields with one, and is needed to port
over the ib-diags.

Remove the opensm #if __WIN__ work-around.

Signed-off-by: Sean Hefty <[email protected]>
---
Index: core/al/kernel/al_cm_cep.c
===================================================================
--- core/al/kernel/al_cm_cep.c  (revision 2812)
+++ core/al/kernel/al_cm_cep.c  (working copy)
@@ -27,7 +27,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  *
- * $Id: al_cm_cep.c 2540 2009-11-03 17:23:09Z shefty $
+ * $Id$
  */
 
 
@@ -5967,8 +5967,7 @@
        p_path->rate = conn_req_path_get_pkt_rate(p_info);
        p_path->pkt_life = conn_req_path_get_lcl_ack_timeout(p_info);
        p_path->preference = 0;
-       p_path->resv1 = 0;
-       p_path->resv2 = 0;
+       memset(p_path->resv2, 0, sizeof(p_path->resv2));
 }
 
 static void
Index: core/al/kernel/al_ioc_pnp.c
===================================================================
--- core/al/kernel/al_ioc_pnp.c (revision 2812)
+++ core/al/kernel/al_ioc_pnp.c (working copy)
@@ -979,8 +979,7 @@
         * Clear reserved fields in case they were set to prevent undue path
         * thrashing.
         */
-       p_path->rec.resv1 = 0;
-       p_path->rec.resv2 = 0;
+       memset(p_path->rec.resv2, 0, sizeof(p_path->rec.resv2));
 
        return p_path;
 }
Index: inc/iba/ib_types.h
===================================================================
--- inc/iba/ib_types.h  (revision 2812)
+++ inc/iba/ib_types.h  (working copy)
@@ -974,6 +974,8 @@
 #define IB_SA_MAD_STATUS_TOO_MANY_RECORDS      (CL_HTON16(0x0400))
 #define IB_SA_MAD_STATUS_INVALID_GID           (CL_HTON16(0x0500))
 #define IB_SA_MAD_STATUS_INSUF_COMPS           (CL_HTON16(0x0600))
+#define IB_SA_MAD_STATUS_DENIED                                
(CL_HTON16(0x0700))
+#define IB_SA_MAD_STATUS_PRIO_SUGGESTED                (CL_HTON16(0x0800))
 
 #define IB_DM_MAD_STATUS_NO_IOC_RESP           (CL_HTON16(0x0100))
 #define IB_DM_MAD_STATUS_NO_SVC_ENTRIES                (CL_HTON16(0x0200))
@@ -2461,8 +2463,7 @@
        uint8_t                                 rate;
        uint8_t                                 pkt_life;
        uint8_t                                 preference;
-       uint16_t                                resv1;
-       uint32_t                                resv2;
+       uint8_t                                 resv2[6];
 
 }      PACK_SUFFIX ib_path_rec_t;
 #include <complib/cl_packoff.h>
@@ -2513,9 +2514,6 @@
 *              Indicates the relative merit of this path versus other path
 *              records returned from the SA.  Lower numbers are better.
 *
-*      resv1
-*              Reserved bytes.
-*
 *      resv2
 *              Reserved bytes.
 * SEE ALSO
@@ -2825,8 +2823,7 @@
        p_rec->tclass = 0;
        p_rec->service_id = 0;
 
-       p_rec->resv1 = 0;
-       p_rec->resv2 = 0;
+       memset(p_rec->resv2, 0, sizeof(p_rec->resv2));
 }
 /*
 * PARAMETERS
Index: ulp/opensm/user/opensm/osm_helper.c
===================================================================
--- ulp/opensm/user/opensm/osm_helper.c (revision 2812)
+++ ulp/opensm/user/opensm/osm_helper.c (working copy)
@@ -1062,9 +1062,7 @@
        if (osm_log_is_active(p_log, log_level)) {
                char gid_str[INET6_ADDRSTRLEN];
                char gid_str2[INET6_ADDRSTRLEN];
-#ifdef __WIN__
-               uint8_t *p_resv = (uint8_t*) &p_pr->resv1;
-#endif
+
                osm_log(p_log, log_level,
                        "PathRecord dump:\n"
                        "\t\t\t\tservice_id..............0x%016" PRIx64 "\n"
@@ -1093,13 +1091,8 @@
                        p_pr->num_path, cl_ntoh16(p_pr->pkey),
                        ib_path_rec_qos_class(p_pr), ib_path_rec_sl(p_pr),
                        p_pr->mtu, p_pr->rate, p_pr->pkt_life, p_pr->preference,
-#ifdef __WIN__
-                       p_resv[0], p_resv[1], p_resv[2],
-                       p_resv[3], p_resv[4], p_resv[5]);
-#else
                        p_pr->resv2[0], p_pr->resv2[1], p_pr->resv2[2],
                        p_pr->resv2[3], p_pr->resv2[4], p_pr->resv2[5]);
-#endif
        }
 }
 

_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to