]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
libibmad: update to commit 669083324cd5a43db5c865040c3a220cea8b496f
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 11 Feb 2009 13:28:01 +0000 (13:28 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 11 Feb 2009 13:28:01 +0000 (13:28 +0000)
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1953 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/ulp/libibmad/include/infiniband/mad.h
trunk/ulp/libibmad/src/dump.c
trunk/ulp/libibmad/src/fields.c
trunk/ulp/libibmad/src/gs.c
trunk/ulp/libibmad/src/libibmad.map [new file with mode: 0644]
trunk/ulp/libibmad/src/mad.c
trunk/ulp/libibmad/src/portid.c
trunk/ulp/libibmad/src/resolve.c

index c23f19803077c46835097b2435535b7fa63218a3..3095f347f41d6d46af9825fb3b8677f230b4b0d0 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2009 HNR Consulting.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -262,7 +263,7 @@ enum MAD_FIELDS {
        IB_DRSMP_RPATH_F,
 
        /*
-        * PortInfo fields:
+        * PortInfo fields
         */
        IB_PORT_FIRST_F,
        IB_PORT_MKEY_F = IB_PORT_FIRST_F,
@@ -314,7 +315,7 @@ enum MAD_FIELDS {
        IB_PORT_LAST_F,
 
        /*
-        * NodeInfo fields:
+        * NodeInfo fields
         */
        IB_NODE_FIRST_F,
        IB_NODE_BASE_VERS_F = IB_NODE_FIRST_F,
@@ -332,7 +333,7 @@ enum MAD_FIELDS {
        IB_NODE_LAST_F,
 
        /*
-        * SwitchInfo fields:
+        * SwitchInfo fields
         */
        IB_SW_FIRST_F,
        IB_SW_LINEAR_FDB_CAP_F = IB_SW_FIRST_F,
@@ -354,17 +355,17 @@ enum MAD_FIELDS {
        IB_SW_LAST_F,
 
        /*
-        * SwitchLinearForwardingTable fields:
+        * SwitchLinearForwardingTable fields
         */
        IB_LINEAR_FORW_TBL_F,
 
        /*
-        * SwitchMulticastForwardingTable fields:
+        * SwitchMulticastForwardingTable fields
         */
        IB_MULTICAST_FORW_TBL_F,
 
        /*
-        * NodeDescription fields:
+        * NodeDescription fields
         */
        IB_NODE_DESC_F,
 
@@ -524,6 +525,32 @@ enum MAD_FIELDS {
         */
        IB_GUID_GUID0_F,
 
+       /*
+        * ClassPortInfo fields
+        */
+       IB_CPI_BASEVER_F,
+       IB_CPI_CLASSVER_F,
+       IB_CPI_CAPMASK_F,
+       IB_CPI_CAPMASK2_F,
+       IB_CPI_RESP_TIME_VALUE_F,
+       IB_CPI_REDIRECT_GID_F,
+       IB_CPI_REDIRECT_TC_F,
+       IB_CPI_REDIRECT_SL_F,
+       IB_CPI_REDIRECT_FL_F,
+       IB_CPI_REDIRECT_LID_F,
+       IB_CPI_REDIRECT_PKEY_F,
+       IB_CPI_REDIRECT_QP_F,
+       IB_CPI_REDIRECT_QKEY_F,
+       IB_CPI_TRAP_GID_F,
+       IB_CPI_TRAP_TC_F,
+       IB_CPI_TRAP_SL_F,
+       IB_CPI_TRAP_FL_F,
+       IB_CPI_TRAP_LID_F,
+       IB_CPI_TRAP_PKEY_F,
+       IB_CPI_TRAP_HL_F,
+       IB_CPI_TRAP_QP_F,
+       IB_CPI_TRAP_QKEY_F,
+
        IB_FIELD_LAST_          /* must be last */
 };
 
@@ -595,14 +622,14 @@ typedef struct ib_vendor_call {
 #define MAD_DEF_RETRIES                3
 #define MAD_DEF_TIMEOUT_MS     1000
 
-enum {
+enum MAD_DEST {
        IB_DEST_LID,
        IB_DEST_DRPATH,
        IB_DEST_GUID,
        IB_DEST_DRSLID,
 };
 
-enum {
+enum MAD_NODE_TYPE {
        IB_NODE_CA = 1,
        IB_NODE_SWITCH,
        IB_NODE_ROUTER,
@@ -631,20 +658,20 @@ static inline int ib_portid_set(ib_portid_t * portid, int lid, int qp, int qkey)
 }
 
 /* fields.c */
-MAD_EXPORT uint32_t mad_get_field(void *buf, int base_offs, int field);
-MAD_EXPORT void mad_set_field(void *buf, int base_offs, int field,
+MAD_EXPORT uint32_t mad_get_field(void *buf, int base_offs, enum MAD_FIELDS field);
+MAD_EXPORT void mad_set_field(void *buf, int base_offs, enum MAD_FIELDS field,
                              uint32_t val);
 /* field must be byte aligned */
-MAD_EXPORT uint64_t mad_get_field64(void *buf, int base_offs, int field);
-MAD_EXPORT void mad_set_field64(void *buf, int base_offs, int field,
+MAD_EXPORT uint64_t mad_get_field64(void *buf, int base_offs, enum MAD_FIELDS field);
+MAD_EXPORT void mad_set_field64(void *buf, int base_offs, enum MAD_FIELDS field,
                                uint64_t val);
-MAD_EXPORT void mad_set_array(void *buf, int base_offs, int field, void *val);
-MAD_EXPORT void mad_get_array(void *buf, int base_offs, int field, void *val);
-MAD_EXPORT void mad_decode_field(uint8_t * buf, int field, void *val);
-MAD_EXPORT void mad_encode_field(uint8_t * buf, int field, void *val);
-MAD_EXPORT int mad_print_field(int field, const char *name, void *val);
-MAD_EXPORT char *mad_dump_field(int field, char *buf, int bufsz, void *val);
-MAD_EXPORT char *mad_dump_val(int field, char *buf, int bufsz, void *val);
+MAD_EXPORT void mad_set_array(void *buf, int base_offs, enum MAD_FIELDS field, void *val);
+MAD_EXPORT void mad_get_array(void *buf, int base_offs, enum MAD_FIELDS field, void *val);
+MAD_EXPORT void mad_decode_field(uint8_t * buf, enum MAD_FIELDS field, void *val);
+MAD_EXPORT void mad_encode_field(uint8_t * buf, enum MAD_FIELDS field, void *val);
+MAD_EXPORT int mad_print_field(enum MAD_FIELDS field, const char *name, void *val);
+MAD_EXPORT char *mad_dump_field(enum MAD_FIELDS field, char *buf, int bufsz, void *val);
+MAD_EXPORT char *mad_dump_val(enum MAD_FIELDS field, char *buf, int bufsz, void *val);
 
 /* mad.c */
 MAD_EXPORT void *mad_encode(void *buf, ib_rpc_t * rpc, ib_dr_path_t * drpath,
@@ -710,7 +737,7 @@ MAD_EXPORT uint8_t *smp_query(void *buf, ib_portid_t * id, unsigned attrid,
                              unsigned mod, unsigned timeout);
 MAD_EXPORT uint8_t *smp_set(void *buf, ib_portid_t * id, unsigned attrid,
                            unsigned mod, unsigned timeout);
-MAD_EXPORT uint8_t *smp_query_via(void *buf, ib_portid_t * id, unsigned attrid,
+uint8_t *smp_query_via(void *buf, ib_portid_t * id, unsigned attrid,
                       unsigned mod, unsigned timeout, const void *srcport);
 uint8_t *smp_set_via(void *buf, ib_portid_t * id, unsigned attrid, unsigned mod,
                     unsigned timeout, const void *srcport);
@@ -729,7 +756,7 @@ MAD_EXPORT int ib_resolve_smlid(ib_portid_t * sm_id, int timeout);
 MAD_EXPORT int ib_resolve_guid(ib_portid_t * portid, uint64_t * guid,
                               ib_portid_t * sm_id, int timeout);
 MAD_EXPORT int ib_resolve_portid_str(ib_portid_t * portid, char *addr_str,
-                                    int dest_type, ib_portid_t * sm_id);
+                                    enum MAD_DEST dest, ib_portid_t * sm_id);
 MAD_EXPORT int ib_resolve_self(ib_portid_t * portid, int *portnum,
                               ibmad_gid_t * gid);
 
@@ -737,7 +764,7 @@ int ib_resolve_smlid_via(ib_portid_t * sm_id, int timeout, const void *srcport);
 int ib_resolve_guid_via(ib_portid_t * portid, uint64_t * guid,
                        ib_portid_t * sm_id, int timeout, const void *srcport);
 int ib_resolve_portid_str_via(ib_portid_t * portid, char *addr_str,
-                             int dest_type, ib_portid_t * sm_id,
+                             enum MAD_DEST dest, ib_portid_t * sm_id,
                              const void *srcport);
 int ib_resolve_self_via(ib_portid_t * portid, int *portnum, ibmad_gid_t * gid,
                        const void *srcport);
@@ -837,7 +864,7 @@ static inline uint64_t htonll(uint64_t x)
        exit(-1); \
 } while(0)
 
-MAD_EXPORT void xdump(FILE * file, char *msg, void *p, int size);
+void xdump(FILE * file, char *msg, void *p, int size);
 
 END_C_DECLS
 #endif                         /* _MAD_H_ */
index 1cf5232504d30858122f7e7b929edbda0efb13f5..3b491588f082c46adf78ebf0622688e3526afdd6 100644 (file)
@@ -46,10 +46,10 @@ void mad_dump_int(char *buf, int bufsz, void *val, int valsz)
 {
        switch (valsz) {
        case 1:
-               snprintf(buf, bufsz, "%d", *(uint8_t *) val);
+               snprintf(buf, bufsz, "%d", *(uint32_t *) val & 0xff);
                break;
        case 2:
-               snprintf(buf, bufsz, "%d", *(uint16_t *) val);
+               snprintf(buf, bufsz, "%d", *(uint32_t *) val & 0xffff);
                break;
        case 3:
        case 4:
@@ -71,10 +71,10 @@ void mad_dump_uint(char *buf, int bufsz, void *val, int valsz)
 {
        switch (valsz) {
        case 1:
-               snprintf(buf, bufsz, "%u", *(uint8_t *) val);
+               snprintf(buf, bufsz, "%u", *(uint32_t *) val & 0xff);
                break;
        case 2:
-               snprintf(buf, bufsz, "%u", *(uint16_t *) val);
+               snprintf(buf, bufsz, "%u", *(uint32_t *) val & 0xffff);
                break;
        case 3:
        case 4:
@@ -96,10 +96,10 @@ void mad_dump_hex(char *buf, int bufsz, void *val, int valsz)
 {
        switch (valsz) {
        case 1:
-               snprintf(buf, bufsz, "0x%02x", *(uint8_t *) val);
+               snprintf(buf, bufsz, "0x%02x", *(uint32_t *) val & 0xff);
                break;
        case 2:
-               snprintf(buf, bufsz, "0x%04x", *(uint16_t *) val);
+               snprintf(buf, bufsz, "0x%04x", *(uint32_t *) val & 0xffff);
                break;
        case 3:
                snprintf(buf, bufsz, "0x%06x", *(uint32_t *) val & 0xffffff);
@@ -132,10 +132,10 @@ void mad_dump_rhex(char *buf, int bufsz, void *val, int valsz)
 {
        switch (valsz) {
        case 1:
-               snprintf(buf, bufsz, "%02x", *(uint8_t *) val);
+               snprintf(buf, bufsz, "%02x", *(uint32_t *) val & 0xff);
                break;
        case 2:
-               snprintf(buf, bufsz, "%04x", *(uint16_t *) val);
+               snprintf(buf, bufsz, "%04x", *(uint32_t *) val & 0xffff);
                break;
        case 3:
                snprintf(buf, bufsz, "%06x", *(uint32_t *) val & 0xffffff);
index 1f2cec516ba8e73844e420c8d549045a3d7f2cf8..08d0ccb611524ec35951d46580ecff78ce59bd2c 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2009 HNR Consulting.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -87,7 +88,7 @@ static const ib_field_t ib_mad_f[] = {
        {160, 32, "MadModifier", mad_dump_hex}, /* TODO: add dumper */
 
        /* word 7,8 (24-31 bytes) */
-       {196, 64, "MadMkey", mad_dump_hex},
+       {192, 64, "MadMkey", mad_dump_hex},
 
        /* word 9 (32-37 bytes) */
        {BE_OFFS(256, 16), "DrSmpDLID", mad_dump_hex},
@@ -118,7 +119,7 @@ static const ib_field_t ib_mad_f[] = {
        {1536, 512, "DrSmpRetPath", mad_dump_hex},
 
        /*
-        * PortInfo fields:
+        * PortInfo fields
         */
        {0, 64, "Mkey", mad_dump_hex},
        {64, 64, "GidPrefix", mad_dump_hex},
@@ -169,7 +170,7 @@ static const ib_field_t ib_mad_f[] = {
        {0, 0},                 /* IB_PORT_LAST_F */
 
        /*
-        * NodeInfo fields:
+        * NodeInfo fields
         */
        {BITSOFFS(0, 8), "BaseVers", mad_dump_uint},
        {BITSOFFS(8, 8), "ClassVers", mad_dump_uint},
@@ -186,7 +187,7 @@ static const ib_field_t ib_mad_f[] = {
        {0, 0},                 /* IB_NODE_LAST_F */
 
        /*
-        * SwitchInfo fields:
+        * SwitchInfo fields
         */
        {BITSOFFS(0, 16), "LinearFdbCap", mad_dump_uint},
        {BITSOFFS(16, 16), "RandomFdbCap", mad_dump_uint},
@@ -207,17 +208,17 @@ static const ib_field_t ib_mad_f[] = {
        {0, 0},                 /* IB_SW_LAST_F */
 
        /*
-        * SwitchLinearForwardingTable fields:
+        * SwitchLinearForwardingTable fields
         */
        {0, 512, "LinearForwTbl", mad_dump_array},
 
        /*
-        * SwitchMulticastForwardingTable fields:
+        * SwitchMulticastForwardingTable fields
         */
        {0, 512, "MulticastForwTbl", mad_dump_array},
 
        /*
-        * NodeDescription fields:
+        * NodeDescription fields
         */
        {0, 64 * 8, "NodeDesc", mad_dump_string},
 
@@ -374,6 +375,33 @@ static const ib_field_t ib_mad_f[] = {
         * GUIDInfo fields
         */
        {0, 64, "GUID0", mad_dump_hex},
+
+       /*
+        * ClassPortInfo fields
+        */
+       {BITSOFFS(0, 8), "BaseVersion", mad_dump_uint},
+       {BITSOFFS(8, 8), "ClassVersion", mad_dump_uint},
+       {BITSOFFS(16, 16), "CapabilityMask", mad_dump_hex},
+       {BITSOFFS(32, 27), "CapabilityMask2", mad_dump_hex},
+       {BITSOFFS(59, 5), "RespTimeVal", mad_dump_uint},
+       {64, 128, "RedirectGID", mad_dump_array},
+       {BITSOFFS(192, 8), "RedirectTC", mad_dump_hex},
+       {BITSOFFS(200, 4), "RedirectSL", mad_dump_uint},
+       {BITSOFFS(204, 20), "RedirectFL", mad_dump_hex},
+       {BITSOFFS(224, 16), "RedirectLID", mad_dump_hex},
+       {BITSOFFS(240, 16), "RedirectPKey", mad_dump_hex},
+       {BITSOFFS(264, 24), "RedirectQP", mad_dump_hex},
+       {288, 32, "RedirectQKey", mad_dump_hex},
+       {320, 128, "TrapGID", mad_dump_array},
+       {BITSOFFS(448, 8), "TrapTC", mad_dump_hex},
+       {BITSOFFS(456, 4), "TrapSL", mad_dump_uint},
+       {BITSOFFS(460, 20), "TrapFL", mad_dump_hex},
+       {BITSOFFS(480, 16), "TrapLID", mad_dump_hex},
+       {BITSOFFS(496, 16), "TrapPKey", mad_dump_hex},
+       {BITSOFFS(512, 8), "TrapHL", mad_dump_uint},
+       {BITSOFFS(520, 24), "TrapQP", mad_dump_hex},
+       {544, 32, "TrapQKey", mad_dump_hex},
+
        {0, 0}                  /* IB_FIELD_LAST_ */
 
 };
@@ -479,37 +507,37 @@ static void _get_array(void *buf, int base_offs, const ib_field_t * f,
        memcpy(val, (uint8_t *) buf + base_offs + bitoffs / 8, f->bitlen / 8);
 }
 
-uint32_t mad_get_field(void *buf, int base_offs, int field)
+uint32_t mad_get_field(void *buf, int base_offs, enum MAD_FIELDS field)
 {
        return _get_field(buf, base_offs, ib_mad_f + field);
 }
 
-void mad_set_field(void *buf, int base_offs, int field, uint32_t val)
+void mad_set_field(void *buf, int base_offs, enum MAD_FIELDS field, uint32_t val)
 {
        _set_field(buf, base_offs, ib_mad_f + field, val);
 }
 
-uint64_t mad_get_field64(void *buf, int base_offs, int field)
+uint64_t mad_get_field64(void *buf, int base_offs, enum MAD_FIELDS field)
 {
        return _get_field64(buf, base_offs, ib_mad_f + field);
 }
 
-void mad_set_field64(void *buf, int base_offs, int field, uint64_t val)
+void mad_set_field64(void *buf, int base_offs, enum MAD_FIELDS field, uint64_t val)
 {
        _set_field64(buf, base_offs, ib_mad_f + field, val);
 }
 
-void mad_set_array(void *buf, int base_offs, int field, void *val)
+void mad_set_array(void *buf, int base_offs, enum MAD_FIELDS field, void *val)
 {
        _set_array(buf, base_offs, ib_mad_f + field, val);
 }
 
-void mad_get_array(void *buf, int base_offs, int field, void *val)
+void mad_get_array(void *buf, int base_offs, enum MAD_FIELDS field, void *val)
 {
        _get_array(buf, base_offs, ib_mad_f + field, val);
 }
 
-void mad_decode_field(uint8_t * buf, int field, void *val)
+void mad_decode_field(uint8_t * buf, enum MAD_FIELDS field, void *val)
 {
        const ib_field_t *f = ib_mad_f + field;
 
@@ -528,7 +556,7 @@ void mad_decode_field(uint8_t * buf, int field, void *val)
        _get_array(buf, 0, f, val);
 }
 
-void mad_encode_field(uint8_t * buf, int field, void *val)
+void mad_encode_field(uint8_t * buf, enum MAD_FIELDS field, void *val)
 {
        const ib_field_t *f = ib_mad_f + field;
 
@@ -602,21 +630,21 @@ static int _mad_print_field(const ib_field_t * f, const char *name, void *val,
                         valsz ? valsz : ALIGN(f->bitlen, 8) / 8);
 }
 
-int mad_print_field(int field, const char *name, void *val)
+int mad_print_field(enum MAD_FIELDS field, const char *name, void *val)
 {
        if (field <= IB_NO_FIELD || field >= IB_FIELD_LAST_)
                return -1;
        return _mad_print_field(ib_mad_f + field, name, val, 0);
 }
 
-char *mad_dump_field(int field, char *buf, int bufsz, void *val)
+char *mad_dump_field(enum MAD_FIELDS field, char *buf, int bufsz, void *val)
 {
        if (field <= IB_NO_FIELD || field >= IB_FIELD_LAST_)
                return 0;
        return _mad_dump_field(ib_mad_f + field, 0, buf, bufsz, val);
 }
 
-char *mad_dump_val(int field, char *buf, int bufsz, void *val)
+char *mad_dump_val(enum MAD_FIELDS field, char *buf, int bufsz, void *val)
 {
        if (field <= IB_NO_FIELD || field >= IB_FIELD_LAST_)
                return 0;
index 4e3472802e87e70291b103b41bb15497fa59a51d..d2c45741546a20fd818520b7baf63f0c55d854d0 100644 (file)
@@ -52,7 +52,7 @@ static uint8_t *pma_query_via(void *rcvbuf, ib_portid_t * dest, int port,
        ib_rpc_t rpc = { 0 };
        int lid = dest->lid;
 
-       DEBUG("lid %d port %d", lid, port);
+       DEBUG("lid %u port %d", lid, port);
 
        if (lid == -1) {
                IBWARN("only lid routed is supported");
@@ -121,7 +121,7 @@ static uint8_t *performance_reset_via(void *rcvbuf, ib_portid_t * dest,
        ib_rpc_t rpc = { 0 };
        int lid = dest->lid;
 
-       DEBUG("lid %d port %d mask 0x%x", lid, port, mask);
+       DEBUG("lid %u port %d mask 0x%x", lid, port, mask);
 
        if (lid == -1) {
                IBWARN("only lid routed is supported");
diff --git a/trunk/ulp/libibmad/src/libibmad.map b/trunk/ulp/libibmad/src/libibmad.map
new file mode 100644 (file)
index 0000000..f944d86
--- /dev/null
@@ -0,0 +1,107 @@
+IBMAD_1.3 {
+       global:
+               xdump;
+               mad_dump_field;
+               mad_dump_val;
+               mad_print_field;
+               mad_dump_array;
+               mad_dump_bitfield;
+               mad_dump_hex;
+               mad_dump_int;
+               mad_dump_linkdowndefstate;
+               mad_dump_linkspeed;
+               mad_dump_linkspeeden;
+               mad_dump_linkspeedsup;
+               mad_dump_linkwidth;
+               mad_dump_linkwidthen;
+               mad_dump_linkwidthsup;
+               mad_dump_mtu;
+               mad_dump_node_type;
+               mad_dump_nodedesc;
+               mad_dump_nodeinfo;
+               mad_dump_opervls;
+               mad_dump_perfcounters;
+               mad_dump_perfcounters_ext;
+               mad_dump_physportstate;
+               mad_dump_portcapmask;
+               mad_dump_portinfo;
+               mad_dump_portstates;
+               mad_dump_portstate;
+               mad_dump_rhex;
+               mad_dump_sltovl;
+               mad_dump_string;
+               mad_dump_switchinfo;
+               mad_dump_uint;
+               mad_dump_vlarbitration;
+               mad_dump_vlcap;
+               mad_get_field;
+               mad_set_field;
+               mad_get_field64;
+               mad_set_field64;
+               mad_get_array;
+               mad_set_array;
+               perf_classportinfo_query;
+               port_performance_query;
+               port_performance_reset;
+               port_performance_ext_query;
+               port_performance_ext_reset;
+               port_samples_control_query;
+               port_samples_result_query;
+               mad_build_pkt;
+               mad_decode_field;
+               mad_encode;
+               mad_encode_field;
+               mad_trid;
+               portid2portnum;
+               portid2str;
+               str2drpath;
+               drpath2str;
+               mad_agent_class;
+               mad_class_agent;
+               mad_register_client;
+               mad_register_server;
+               ib_resolve_guid;
+               ib_resolve_portid_str;
+               ib_resolve_self;
+               ib_resolve_smlid;
+               ibdebug;
+               mad_rpc_open_port;
+               mad_rpc_close_port;
+               mad_rpc;
+               mad_rpc_rmpp;
+               madrpc;
+               madrpc_def_timeout;
+               madrpc_init;
+               madrpc_portid;
+               madrpc_rmpp;
+               madrpc_save_mad;
+               madrpc_set_retries;
+               madrpc_set_timeout;
+               madrpc_show_errors;
+               ib_path_query;
+               sa_call;
+               sa_rpc_call;
+               mad_alloc;
+               mad_free;
+               mad_receive;
+               mad_respond;
+               mad_send;
+               smp_query;
+               smp_set;
+               ib_vendor_call;
+               smp_query_via;
+               smp_set_via;
+               ib_path_query_via;
+               ib_resolve_smlid_via;
+               ib_resolve_guid_via;
+               ib_resolve_portid_str_via;
+               ib_resolve_self_via;
+               perf_classportinfo_query_via;
+               port_performance_query_via;
+               port_performance_reset_via;
+               port_performance_ext_query_via;
+               port_performance_ext_reset_via;
+               port_samples_control_query_via;
+               port_samples_result_query_via;
+       local: *;
+};
index d059a70ffea9d18197ef2d44f2a766e15af9ba9c..3f04da03da6fa1936eef6acdd044d84db21f4723 100644 (file)
@@ -96,9 +96,7 @@ void *mad_encode(void *buf, ib_rpc_t * rpc, ib_dr_path_t * drpath, void *data)
        mad_set_field(buf, 0, IB_MAD_ATTRMOD_F, rpc->attr.mod);
 
        /* words 7,8 */
-       mad_set_field(buf, 0, IB_MAD_MKEY_F, (uint32_t) (rpc->mkey >> 32));
-       mad_set_field(buf, 4, IB_MAD_MKEY_F,
-                     (uint32_t) (rpc->mkey & 0xffffffff));
+       mad_set_field64(buf, 0, IB_MAD_MKEY_F, rpc->mkey);
 
        if (rpc->mgtclass == IB_SMI_DIRECT_CLASS) {
                /* word 9 */
index 1daf005b9ffa6b18aa7debb4411cb83b12bf85f4..de9e2d3e37cf6c1370aeb512777cab0b570a27ff 100644 (file)
@@ -104,7 +104,7 @@ int str2drpath(ib_dr_path_t * path, char *routepath, int drslid, int drdlid)
 char *drpath2str(ib_dr_path_t * path, char *dstr, size_t dstr_size)
 {
        int i = 0;
-       int rc = snprintf(dstr, dstr_size, "slid %d; dlid %d; %d",
+       int rc = snprintf(dstr, dstr_size, "slid %u; dlid %u; %d",
                          path->drslid, path->drdlid, path->p[0]);
        if (rc >= (int)dstr_size)
                return dstr;
index b62360b1295bb22c04f64ff4cf4cca132af8fd30..553949dab613cf5b493da5508404eeb102cb6c83 100644 (file)
@@ -92,7 +92,7 @@ int ib_resolve_guid_via(ib_portid_t * portid, uint64_t * guid,
 }
 
 int ib_resolve_portid_str_via(ib_portid_t * portid, char *addr_str,
-                             int dest_type, ib_portid_t * sm_id,
+                             enum MAD_DEST dest_type, ib_portid_t * sm_id,
                              const void *srcport)
 {
        uint64_t guid;
@@ -142,8 +142,8 @@ int ib_resolve_portid_str_via(ib_portid_t * portid, char *addr_str,
        return -1;
 }
 
-int ib_resolve_portid_str(ib_portid_t * portid, char *addr_str, int dest_type,
-                         ib_portid_t * sm_id)
+int ib_resolve_portid_str(ib_portid_t * portid, char *addr_str,
+                       enum MAD_DEST dest_type, ib_portid_t * sm_id)
 {
        return ib_resolve_portid_str_via(portid, addr_str, dest_type,
                                         sm_id, NULL);