[ofa-general] [PATCH 1/4] ib-mgmt/ibn3 branch: diags updated for continued windows support

Sean Hefty sean.hefty at intel.com
Tue Apr 21 12:02:18 PDT 2009


Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
This patch is based on the ibn3 branch

 infiniband-diags/src/ibaddr.c        |    1 +
 infiniband-diags/src/iblinkinfo.c    |    4 ++--
 infiniband-diags/src/ibnetdiscover.c |    2 +-
 infiniband-diags/src/ibsendtrap.c    |    4 ++--
 infiniband-diags/src/vendstat.c      |    4 ++--
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/infiniband-diags/src/ibaddr.c b/infiniband-diags/src/ibaddr.c
index bb22be9..7909a52 100644
--- a/infiniband-diags/src/ibaddr.c
+++ b/infiniband-diags/src/ibaddr.c
@@ -39,6 +39,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <getopt.h>
+#include <arpa/inet.h>
 
 #include <infiniband/umad.h>
 #include <infiniband/mad.h>
diff --git a/infiniband-diags/src/iblinkinfo.c b/infiniband-diags/src/iblinkinfo.c
index 1e43788..c6ce81b 100644
--- a/infiniband-diags/src/iblinkinfo.c
+++ b/infiniband-diags/src/iblinkinfo.c
@@ -48,7 +48,7 @@
 #include <errno.h>
 #include <inttypes.h>
 
-#include <infiniband/complib/cl_nodenamemap.h>
+#include <complib/cl_nodenamemap.h>
 #include <infiniband/ibnetdisc.h>
 
 char *argv0 = "iblinkinfotest";
@@ -284,7 +284,7 @@ main(int argc, char **argv)
 		{ "compat", 0, 0, 3},
 		{ "from", 1, 0, 'f'},
 		{ "R", 0, 0, 'R'},
-		{ }
+		{ 0 }
 	};
 
 	f = stdout;
diff --git a/infiniband-diags/src/ibnetdiscover.c b/infiniband-diags/src/ibnetdiscover.c
index 99750f0..2ca696e 100644
--- a/infiniband-diags/src/ibnetdiscover.c
+++ b/infiniband-diags/src/ibnetdiscover.c
@@ -210,7 +210,7 @@ out_chassis(ibnd_fabric_t *fabric, int chassisnum)
 	uint64_t guid;
 
 	fprintf(f, "\nChassis %d", chassisnum);
-	guid = ibnd_get_chassis_guid(fabric, chassisnum);
+	guid = ibnd_get_chassis_guid(fabric, (unsigned char) chassisnum);
 	if (guid)
 		fprintf(f, " (guid 0x%" PRIx64 ")", guid);
 	fprintf(f, "\n");
diff --git a/infiniband-diags/src/ibsendtrap.c b/infiniband-diags/src/ibsendtrap.c
index d0afca0..13f125f 100644
--- a/infiniband-diags/src/ibsendtrap.c
+++ b/infiniband-diags/src/ibsendtrap.c
@@ -73,7 +73,7 @@ static void build_trap129(ib_mad_notice_attr_t * n, uint16_t lid)
 	n->issuer_lid = cl_hton16(lid);
 	n->data_details.ntc_129_131.lid = cl_hton16(lid);
 	n->data_details.ntc_129_131.pad = 0;
-	n->data_details.ntc_129_131.port_num = error_port;
+	n->data_details.ntc_129_131.port_num = (uint8_t) error_port;
 }
 
 static int send_trap(const char *name,
@@ -100,7 +100,7 @@ static int send_trap(const char *name,
 	trap_rpc.dataoffs = IB_SMP_DATA_OFFS;
 
 	memset(&notice, 0, sizeof(notice));
-	build(&notice, selfportid.lid);
+	build(&notice, (uint16_t) selfportid.lid);
 
 	return mad_send_via(&trap_rpc, &sm_port, NULL, &notice, srcport);
 }
diff --git a/infiniband-diags/src/vendstat.c b/infiniband-diags/src/vendstat.c
index 240c4cb..0bf9616 100644
--- a/infiniband-diags/src/vendstat.c
+++ b/infiniband-diags/src/vendstat.c
@@ -184,8 +184,8 @@ void config_counter_groups(ib_portid_t *portid, int port)
 	cg_config = (is4_config_counter_groups_t *)&buf;
 
 	printf("counter_groups_config: configuring group0 %d group1 %d\n", cg0, cg1);
-	cg_config->group_selects[0].group_select = cg0;
-	cg_config->group_selects[1].group_select = cg1;
+	cg_config->group_selects[0].group_select = (uint8_t) cg0;
+	cg_config->group_selects[1].group_select = (uint8_t) cg1;
 
 	if (!ib_vendor_call_via(&buf, portid, &call, srcport))
 		IBERROR("config counter group set");






More information about the general mailing list