[ofa-general] [PATCH 3/5] Add mcm_rereg_test to test-utils option.

Ira Weiny weiny2 at llnl.gov
Fri Mar 21 15:51:19 PDT 2008


>From 60a6563c1f726137a188a024481f25cbab9b140b Mon Sep 17 00:00:00 2001
From: Ira K. Weiny <weiny2 at llnl.gov>
Date: Fri, 21 Mar 2008 14:44:31 -0700
Subject: [PATCH] Add mcm_rereg_test to test-utils option.
Fix mcm_rereg_test.c to use ibmad_gid_t

Signed-off-by: Ira K. Weiny <weiny2 at llnl.gov>
---
 infiniband-diags/Makefile.am          |    7 +++----
 infiniband-diags/src/mcm_rereg_test.c |   14 +++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/infiniband-diags/Makefile.am b/infiniband-diags/Makefile.am
index d29d417..e502a06 100644
--- a/infiniband-diags/Makefile.am
+++ b/infiniband-diags/Makefile.am
@@ -13,7 +13,7 @@ sbin_PROGRAMS = src/ibaddr src/ibnetdiscover src/ibping src/ibportstate \
 	        src/saquery src/vendstat
 
 if ENABLE_TEST_UTILS
-sbin_PROGRAMS += src/ibsendtrap
+sbin_PROGRAMS += src/ibsendtrap src/mcm_rereg_test
 endif
 
 sbin_SCRIPTS = scripts/ibcheckerrs scripts/ibchecknet scripts/ibchecknode \
@@ -82,9 +82,8 @@ src_ibsendtrap_LDFLAGS = -Wl,--rpath -Wl,$(libdir)
 src_vendstat_SOURCES = src/vendstat.c src/ibdiag_common.c
 src_vendstat_CFLAGS = -Wall $(DBGFLAGS)
 
-#src_mcm_rereg_test_SOURCES = src/mcm_rereg_test.c
-#src_mcm_rereg_test_CFLAGS = -Wall $(DBGFLAGS)
-#sbin_PROGRAMS += src/mcm_rereg_test
+src_mcm_rereg_test_SOURCES = src/mcm_rereg_test.c
+src_mcm_rereg_test_CFLAGS = -Wall $(DBGFLAGS)
 
 man_MANS = man/ibaddr.8 man/ibcheckerrors.8 man/ibcheckerrs.8 \
 	man/ibchecknet.8 man/ibchecknode.8 man/ibcheckport.8 \
diff --git a/infiniband-diags/src/mcm_rereg_test.c b/infiniband-diags/src/mcm_rereg_test.c
index 57c8db6..4f3ccc1 100644
--- a/infiniband-diags/src/mcm_rereg_test.c
+++ b/infiniband-diags/src/mcm_rereg_test.c
@@ -69,12 +69,12 @@
 #define IB_MCR_COMPMASK_JOIN_STATE  (1ULL<<16)
 #define IB_MCR_COMPMASK_PROXY       (1ULL<<17)
 
-static ib_gid_t mgid_ipoib = {
+static ibmad_gid_t mgid_ipoib = {
 	0xff, 0x12, 0x40, 0x1b, 0xff, 0xff, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff
 };
 
-uint64_t build_mcm_rec(uint8_t *data, ib_gid_t mgid, ib_gid_t port_gid)
+uint64_t build_mcm_rec(uint8_t *data, ibmad_gid_t mgid, ibmad_gid_t port_gid)
 {
 	memset(data, 0, IB_SA_DATA_SIZE);
 	mad_set_array(data, 0, IB_SA_MCM_MGID_F, mgid);
@@ -104,7 +104,7 @@ static void build_mcm_rec_umad(void *umad, ib_portid_t *dport, int method,
 }
 
 static int rereg_send(int port, int agent, ib_portid_t *dport,
-		      uint8_t *umad, int len, int method, ib_gid_t port_gid)
+		      uint8_t *umad, int len, int method, ibmad_gid_t port_gid)
 {
 	uint8_t data[IB_SA_DATA_SIZE];
 	uint64_t comp_mask;
@@ -123,7 +123,7 @@ static int rereg_send(int port, int agent, ib_portid_t *dport,
 }
 
 static int rereg_port_gid(int port, int agent, ib_portid_t *dport,
-			  uint8_t *umad, int len, ib_gid_t port_gid)
+			  uint8_t *umad, int len, ibmad_gid_t port_gid)
 {
 	uint8_t data[IB_SA_DATA_SIZE];
 	uint64_t comp_mask;
@@ -152,7 +152,7 @@ static int rereg_port_gid(int port, int agent, ib_portid_t *dport,
 }
 
 struct guid_trid {
-	ib_gid_t gid;
+	ibmad_gid_t gid;
 	uint64_t guid;
 	uint64_t trid;
 };
@@ -194,7 +194,7 @@ static int rereg_send_all(int port, int agent, ib_portid_t *dport,
 static int rereg_mcm_rec_send(int port, int agent, ib_portid_t *dport, int cnt)
 {
 	ib_portid_t portid;
-	ib_gid_t port_gid;
+	ibmad_gid_t port_gid;
 	uint8_t *umad;
 	int len, ret = 0;
 
@@ -384,7 +384,7 @@ static int rereg_and_test_port(char *guid_file, int port, int agent, ib_portid_t
 {
 	char line[256];
 	FILE *f;
-	ib_gid_t port_gid;
+	ibmad_gid_t port_gid;
 	uint64_t prefix = htonll(0xfe80000000000000llu);
 	uint64_t guid = htonll(0x0002c90200223825llu);
 	struct guid_trid *list;
-- 
1.5.1



More information about the general mailing list