[ofa-general] [PATCH 9/10] infiniband-diags: Convert mcm_rereg_test to "new" ibmad interface
Ira Weiny
weiny2 at llnl.gov
Thu Feb 19 19:06:02 PST 2009
>From 4dcd4839baaa7f3bc31d01d5e695fced36b53533 Mon Sep 17 00:00:00 2001
From: Ira Weiny <weiny2 at llnl.gov>
Date: Thu, 19 Feb 2009 18:24:56 -0800
Subject: [PATCH] infiniband-diags: Convert mcm_rereg_test to "new" ibmad interface
Signed-off-by: Ira Weiny <weiny2 at llnl.gov>
---
infiniband-diags/src/mcm_rereg_test.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/infiniband-diags/src/mcm_rereg_test.c b/infiniband-diags/src/mcm_rereg_test.c
index 9285b95..b9d18a4 100644
--- a/infiniband-diags/src/mcm_rereg_test.c
+++ b/infiniband-diags/src/mcm_rereg_test.c
@@ -74,6 +74,8 @@ static ibmad_gid_t mgid_ipoib = {
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff
};
+struct ibmad_port *srcport;
+
uint64_t build_mcm_rec(uint8_t *data, ibmad_gid_t mgid, ibmad_gid_t port_gid)
{
memset(data, 0, IB_SA_DATA_SIZE);
@@ -436,10 +438,13 @@ int main(int argc, char **argv)
if (argc > 1)
guid_file = argv[1];
- madrpc_init(NULL, 0, mgmt_classes, 2);
+ srcport = mad_rpc_open_port(NULL, 0, mgmt_classes, 2);
+ if (!srcport)
+ err("Failed to open port");
+
#if 1
- ib_resolve_smlid(&dport_id, TMO);
+ ib_resolve_smlid_via(&dport_id, TMO, srcport);
#else
memset(&dport_id, 0, sizeof(dport_id));
dport_id.lid = 1;
@@ -457,7 +462,7 @@ int main(int argc, char **argv)
}
#if 1
- port = madrpc_portid();
+ port = mad_rpc_portid(srcport);
#else
ret = umad_init();
--
1.5.4.5
More information about the general
mailing list