[ofw] [PATCH] libibumad - allow MAD traffic on QP1

Smith, Stan stan.smith at intel.com
Mon Mar 29 11:11:09 PDT 2010


Allow SA MAD traffic on QP1 for openSM vendor umad.


--- A/ulp/libibumad/src/umad.cpp        Mon Mar 29 08:53:24 2010
+++ B/ulp/libibumad/src/umad.cpp        Fri Mar 26 14:13:53 2010
@@ -632,9 +632,9 @@
        return 0;
 }

-__declspec(dllexport)
-int umad_register_oui(int portid, int mgmt_class, uint8_t rmpp_version,
-                                         uint8_t oui[3], long method_mask[16/sizeof(long)])
+static int umad_reg_oui(int portid, int mgmt_class, int mgmt_version,
+                                               uint8_t rmpp_version, uint8_t oui[3],
+                                               long method_mask[16/sizeof(long)])
 {
        WM_REGISTER reg;
        UINT64          id = 0;
@@ -645,7 +645,7 @@
        reg.Qpn = (mgmt_class == 0x01 || mgmt_class == 0x81) ? 0 : htonl(1);
        reg.Port = ports[portid].port_num;
        reg.Class = (uint8_t) mgmt_class;
-       reg.Version = 1;
+       reg.Version = (uint8_t) mgmt_version;
        memset(reg.Reserved, 0, sizeof(reg.Reserved));
        memcpy(reg.Oui, oui, sizeof(oui));
        if (method_mask != NULL) {
@@ -659,13 +659,22 @@
 }

 __declspec(dllexport)
+int umad_register_oui(int portid, int mgmt_class, uint8_t rmpp_version,
+                                         uint8_t oui[3], long method_mask[16/sizeof(long)])
+{
+       return umad_reg_oui(portid, mgmt_class, 1,
+                                               rmpp_version, oui, method_mask);
+}
+
+__declspec(dllexport)
 int umad_register(int portid, int mgmt_class, int mgmt_version,
                                  uint8_t rmpp_version, long method_mask[16/sizeof(long)])
 {
        uint8_t oui[3];

        memset(oui, 0, 3);
-       return umad_register_oui(portid, mgmt_class, rmpp_version, oui, method_mask);
+       return umad_reg_oui(portid, mgmt_class, mgmt_version,
+                                               rmpp_version, oui, method_mask);
 }

 __declspec(dllexport)



More information about the ofw mailing list