Bottom: c3c2e3b02cd74f01128072b300204a147b5b08c2
-Top: 721f7edb21f23623f4465fb7a0b8c028b939ca7c
+Top: e0a0e3640045b6523d936c9e4e08ff4148ab1d01
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2011-06-29 17:28:57 -0700
#endif /* ACM_H */
diff --git a/src/acm.c b/src/acm.c
-index 54b2411..82d5972 100644
+index 54b2411..5d0e423 100644
--- a/src/acm.c
+++ b/src/acm.c
@@ -181,6 +181,12 @@ struct acm_request {
static DLIST_ENTRY dev_list;
static atomic_t tid;
-@@ -1914,7 +1920,7 @@ acm_send_resolve(struct acm_ep *ep, struct acm_dest *dest,
+@@ -403,7 +409,7 @@ static void acm_release_sa_dest(struct acm_dest *dest)
+ //}
+
+ static struct acm_request *
+-acm_alloc_req(struct acm_client *client, struct acm_resolve_msg *msg)
++acm_alloc_req(struct acm_client *client, struct acm_msg *msg)
+ {
+ struct acm_request *req;
+
+@@ -999,11 +1005,10 @@ acm_send_addr_resp(struct acm_ep *ep, struct acm_dest *dest)
+ }
+
+ static int
+-acm_client_resolve_resp(struct acm_client *client, struct acm_resolve_msg *req_msg,
++acm_client_resolve_resp(struct acm_client *client, struct acm_msg *req_msg,
+ struct acm_dest *dest, uint8_t status)
+ {
+ struct acm_msg msg;
+- struct acm_resolve_msg *resp_msg = (struct acm_resolve_msg *) &msg;
+ int ret;
+
+ acm_log(2, "client %d, status 0x%x\n", client->index, status);
+@@ -1021,28 +1026,29 @@ acm_client_resolve_resp(struct acm_client *client, struct acm_resolve_msg *req_m
+ goto release;
+ }
+
+- resp_msg->hdr = req_msg->hdr;
+- resp_msg->hdr.opcode |= ACM_OP_ACK;
+- resp_msg->hdr.status = status;
+- resp_msg->hdr.length = ACM_MSG_HDR_LENGTH;
+- memset(resp_msg->hdr.data, 0, sizeof(resp_msg->hdr.data));
++ msg.hdr = req_msg->hdr;
++ msg.hdr.opcode |= ACM_OP_ACK;
++ msg.hdr.status = status;
++ msg.hdr.length = ACM_MSG_HDR_LENGTH;
++ memset(msg.hdr.data, 0, sizeof(msg.hdr.data));
+
+ if (status == ACM_STATUS_SUCCESS) {
+- resp_msg->hdr.length += ACM_MSG_EP_LENGTH;
+- resp_msg->data[0].flags = IBV_PATH_FLAG_GMP |
++ msg.hdr.length += ACM_MSG_EP_LENGTH;
++ msg.resolve_data[0].flags = IBV_PATH_FLAG_GMP |
+ IBV_PATH_FLAG_PRIMARY | IBV_PATH_FLAG_BIDIRECTIONAL;
+- resp_msg->data[0].type = ACM_EP_INFO_PATH;
+- resp_msg->data[0].info.path = dest->path;
++ msg.resolve_data[0].type = ACM_EP_INFO_PATH;
++ msg.resolve_data[0].info.path = dest->path;
+
+ if (req_msg->hdr.src_out) {
+- resp_msg->hdr.length += ACM_MSG_EP_LENGTH;
+- memcpy(&resp_msg->data[1], &req_msg->data[req_msg->hdr.src_out],
++ msg.hdr.length += ACM_MSG_EP_LENGTH;
++ memcpy(&msg.resolve_data[1],
++ &req_msg->resolve_data[req_msg->hdr.src_out],
+ ACM_MSG_EP_LENGTH);
+ }
+ }
+
+- ret = send(client->sock, (char *) resp_msg, resp_msg->hdr.length, 0);
+- if (ret != resp_msg->hdr.length)
++ ret = send(client->sock, (char *) &msg, msg.hdr.length, 0);
++ if (ret != msg.hdr.length)
+ acm_log(0, "ERROR - failed to send response\n");
+ else
+ ret = 0;
+@@ -1067,8 +1073,7 @@ acm_complete_queued_req(struct acm_dest *dest, uint8_t status)
+ lock_release(&dest->lock);
+
+ acm_log(2, "completing request, client %d\n", req->client->index);
+- acm_client_resolve_resp(req->client,
+- (struct acm_resolve_msg *) &req->msg, dest, status);
++ acm_client_resolve_resp(req->client, &req->msg, dest, status);
+ acm_free_req(req);
+
+ lock_acquire(&dest->lock);
+@@ -1280,7 +1285,7 @@ static void acm_process_acm_recv(struct acm_ep *ep, struct ibv_wc *wc, struct ac
+
+ static int
+ acm_client_query_resp(struct acm_client *client,
+- struct acm_resolve_msg *msg, uint8_t status)
++ struct acm_msg *msg, uint8_t status)
+ {
+ int ret;
+
+@@ -1310,20 +1315,19 @@ static void
+ acm_client_sa_resp(struct acm_send_msg *msg, struct ibv_wc *wc, struct acm_mad *mad)
+ {
+ struct acm_request *req = (struct acm_request *) msg->context;
+- struct acm_resolve_msg *client_req = (struct acm_resolve_msg *) &req->msg;
+ struct ib_sa_mad *sa_mad = (struct ib_sa_mad *) mad;
+ uint8_t status;
+
+ if (mad) {
+ status = (uint8_t) (ntohs(sa_mad->status) >> 8);
+- memcpy(&client_req->data[0].info.path, sa_mad->data,
++ memcpy(&req->msg.resolve_data[0].info.path, sa_mad->data,
+ sizeof(struct ibv_path_record));
+ } else {
+ status = ACM_STATUS_ETIMEDOUT;
+ }
+ acm_log(2, "status 0x%x\n", status);
+
+- acm_client_query_resp(req->client, client_req, status);
++ acm_client_query_resp(req->client, &req->msg, status);
+ acm_free_req(req);
+ }
+
+@@ -1809,7 +1813,7 @@ acm_get_ep(struct acm_ep_addr_data *data)
+ }
+
+ static int
+-acm_svr_query_path(struct acm_client *client, struct acm_resolve_msg *msg)
++acm_svr_query_path(struct acm_client *client, struct acm_msg *msg)
+ {
+ struct acm_request *req;
+ struct acm_send_msg *sa_msg;
+@@ -1824,7 +1828,7 @@ acm_svr_query_path(struct acm_client *client, struct acm_resolve_msg *msg)
+ goto resp;
+ }
+
+- ep = acm_get_ep(&msg->data[0]);
++ ep = acm_get_ep(&msg->resolve_data[0]);
+ if (!ep) {
+ acm_log(1, "notice - could not find local end point\n");
+ status = ACM_STATUS_ESRCADDR;
+@@ -1855,8 +1859,9 @@ acm_svr_query_path(struct acm_client *client, struct acm_resolve_msg *msg)
+ mad = (struct ib_sa_mad *) sa_msg->data;
+ acm_init_path_query(mad);
+
+- memcpy(mad->data, &msg->data[0].info.path, sizeof(struct ibv_path_record));
+- mad->comp_mask = acm_path_comp_mask(&msg->data[0].info.path);
++ memcpy(mad->data, &msg->resolve_data[0].info.path,
++ sizeof(struct ibv_path_record));
++ mad->comp_mask = acm_path_comp_mask(&msg->resolve_data[0].info.path);
+
+ atomic_inc(&counter[ACM_CNTR_ROUTE_QUERY]);
+ acm_post_send(&ep->sa_queue, sa_msg);
+@@ -1914,7 +1919,7 @@ acm_send_resolve(struct acm_ep *ep, struct acm_dest *dest,
static int acm_svr_select_src(struct acm_ep_addr_data *src, struct acm_ep_addr_data *dst)
{
socklen_t len;
int ret;
SOCKET s;
-@@ -1926,13 +1932,13 @@ static int acm_svr_select_src(struct acm_ep_addr_data *src, struct acm_ep_addr_d
+@@ -1926,13 +1931,13 @@ static int acm_svr_select_src(struct acm_ep_addr_data *src, struct acm_ep_addr_d
memset(&addr, 0, sizeof addr);
switch (dst->type) {
case ACM_EP_INFO_ADDRESS_IP:
len = sizeof(struct sockaddr_in6);
break;
default:
-@@ -1940,20 +1946,20 @@ static int acm_svr_select_src(struct acm_ep_addr_data *src, struct acm_ep_addr_d
+@@ -1940,20 +1945,20 @@ static int acm_svr_select_src(struct acm_ep_addr_data *src, struct acm_ep_addr_d
return ACM_STATUS_EDESTTYPE;
}
if (ret) {
acm_log(0, "ERROR - failed to get socket address\n");
ret = socket_errno();
-@@ -1963,9 +1969,9 @@ static int acm_svr_select_src(struct acm_ep_addr_data *src, struct acm_ep_addr_d
+@@ -1963,9 +1968,9 @@ static int acm_svr_select_src(struct acm_ep_addr_data *src, struct acm_ep_addr_d
src->type = dst->type;
src->flags = ACM_EP_FLAG_SOURCE;
if (dst->type == ACM_EP_INFO_ADDRESS_IP) {
}
out:
close(s);
+@@ -1980,7 +1985,7 @@ out:
+ * and we'll resolve a source address later.
+ */
+ static uint8_t
+-acm_svr_verify_resolve(struct acm_resolve_msg *msg,
++acm_svr_verify_resolve(struct acm_msg *msg,
+ struct acm_ep_addr_data **saddr, struct acm_ep_addr_data **daddr)
+ {
+ struct acm_ep_addr_data *src = NULL, *dst = NULL;
+@@ -1993,27 +1998,29 @@ acm_svr_verify_resolve(struct acm_resolve_msg *msg,
+
+ cnt = (msg->hdr.length - ACM_MSG_HDR_LENGTH) / ACM_MSG_EP_LENGTH;
+ for (i = 0; i < cnt; i++) {
+- if (msg->data[i].flags & ACM_EP_FLAG_SOURCE) {
++ if (msg->resolve_data[i].flags & ACM_EP_FLAG_SOURCE) {
+ if (src) {
+ acm_log(0, "ERROR - multiple sources specified\n");
+ return ACM_STATUS_ESRCADDR;
+ }
+- if (!msg->data[i].type || (msg->data[i].type >= ACM_ADDRESS_RESERVED)) {
++ if (!msg->resolve_data[i].type ||
++ (msg->resolve_data[i].type >= ACM_ADDRESS_RESERVED)) {
+ acm_log(0, "ERROR - unsupported source address type\n");
+ return ACM_STATUS_ESRCTYPE;
+ }
+- src = &msg->data[i];
++ src = &msg->resolve_data[i];
+ }
+- if (msg->data[i].flags & ACM_EP_FLAG_DEST) {
++ if (msg->resolve_data[i].flags & ACM_EP_FLAG_DEST) {
+ if (dst) {
+ acm_log(0, "ERROR - multiple destinations specified\n");
+ return ACM_STATUS_EDESTADDR;
+ }
+- if (!msg->data[i].type || (msg->data[i].type >= ACM_ADDRESS_RESERVED)) {
++ if (!msg->resolve_data[i].type ||
++ (msg->resolve_data[i].type >= ACM_ADDRESS_RESERVED)) {
+ acm_log(0, "ERROR - unsupported destination address type\n");
+ return ACM_STATUS_EDESTTYPE;
+ }
+- dst = &msg->data[i];
++ dst = &msg->resolve_data[i];
+ }
+ }
+
+@@ -2024,7 +2031,7 @@ acm_svr_verify_resolve(struct acm_resolve_msg *msg,
+
+ if (!src) {
+ msg->hdr.src_out = i;
+- src = &msg->data[i];
++ src = &msg->resolve_data[i];
+ memset(src, 0, sizeof *src);
+ }
+ *saddr = src;
+@@ -2035,7 +2042,7 @@ acm_svr_verify_resolve(struct acm_resolve_msg *msg,
+ /* Caller must hold dest lock */
+ static uint8_t
+ acm_svr_queue_req(struct acm_dest *dest, struct acm_client *client,
+- struct acm_resolve_msg *msg)
++ struct acm_msg *msg)
+ {
+ struct acm_request *req;
+
+@@ -2050,7 +2057,7 @@ acm_svr_queue_req(struct acm_dest *dest, struct acm_client *client,
+ }
+
+ static int
+-acm_svr_resolve_dest(struct acm_client *client, struct acm_resolve_msg *msg)
++acm_svr_resolve_dest(struct acm_client *client, struct acm_msg *msg)
+ {
+ struct acm_ep *ep;
+ struct acm_dest *dest;
+@@ -2141,7 +2148,7 @@ put:
+ * lookup the destination by either LID or GID.
+ */
+ static int
+-acm_svr_resolve_path(struct acm_client *client, struct acm_resolve_msg *msg)
++acm_svr_resolve_path(struct acm_client *client, struct acm_msg *msg)
+ {
+ struct acm_ep *ep;
+ struct acm_dest *dest;
+@@ -2156,22 +2163,22 @@ acm_svr_resolve_path(struct acm_client *client, struct acm_resolve_msg *msg)
+ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_EINVAL);
+ }
+
+- path = &msg->data[0].info.path;
++ path = &msg->resolve_data[0].info.path;
+ if (!path->dlid && ib_any_gid(&path->dgid)) {
+ acm_log(0, "notice - no destination specified\n");
+ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_EDESTADDR);
+ }
+
+- acm_format_name(2, log_data, sizeof log_data,
+- ACM_EP_INFO_PATH, msg->data[0].info.addr, sizeof *path);
++ acm_format_name(2, log_data, sizeof log_data, ACM_EP_INFO_PATH,
++ msg->resolve_data[0].info.addr, sizeof *path);
+ acm_log(2, "path %s\n", log_data);
+- ep = acm_get_ep(&msg->data[0]);
++ ep = acm_get_ep(&msg->resolve_data[0]);
+ if (!ep) {
+ acm_log(0, "notice - unknown local end point\n");
+ return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_ESRCADDR);
+ }
+
+- addr = msg->data[1].info.addr;
++ addr = msg->resolve_data[1].info.addr;
+ memset(addr, 0, ACM_MAX_ADDRESS);
+ if (path->dlid) {
+ * ((uint16_t *) addr) = path->dlid;
+@@ -2204,7 +2211,7 @@ acm_svr_resolve_path(struct acm_client *client, struct acm_resolve_msg *msg)
+ }
+ /* fall through */
+ default:
+- if (msg->data[0].flags & ACM_FLAGS_NODELAY) {
++ if (msg->resolve_data[0].flags & ACM_FLAGS_NODELAY) {
+ acm_log(2, "lookup initiated, but client wants no delay\n");
+ status = ACM_STATUS_ENODATA;
+ break;
+@@ -2224,10 +2231,10 @@ put:
+ return ret;
+ }
+
+-static int acm_svr_resolve(struct acm_client *client, struct acm_resolve_msg *msg)
++static int acm_svr_resolve(struct acm_client *client, struct acm_msg *msg)
+ {
+- if (msg->data[0].type == ACM_EP_INFO_PATH) {
+- if (msg->data[0].flags & ACM_FLAGS_QUERY_SA) {
++ if (msg->resolve_data[0].type == ACM_EP_INFO_PATH) {
++ if (msg->resolve_data[0].flags & ACM_FLAGS_QUERY_SA) {
+ return acm_svr_query_path(client, msg);
+ } else {
+ return acm_svr_resolve_path(client, msg);
+@@ -2237,7 +2244,7 @@ static int acm_svr_resolve(struct acm_client *client, struct acm_resolve_msg *ms
+ }
+ }
+
+-static int acm_svr_perf_query(struct acm_client *client, struct acm_perf_msg *msg)
++static int acm_svr_perf_query(struct acm_client *client, struct acm_msg *msg)
+ {
+ int ret, i;
+
+@@ -2250,7 +2257,7 @@ static int acm_svr_perf_query(struct acm_client *client, struct acm_perf_msg *ms
+ msg->hdr.length = ACM_MSG_HDR_LENGTH + (ACM_MAX_COUNTER * sizeof(uint64_t));
+
+ for (i = 0; i < ACM_MAX_COUNTER; i++)
+- msg->data[i] = (uint64_t) atomic_get(&counter[i]);
++ msg->perf_data[i] = (uint64_t) atomic_get(&counter[i]);
+
+ ret = send(client->sock, (char *) msg, msg->hdr.length, 0);
+ if (ret != msg->hdr.length)
+@@ -2282,10 +2289,10 @@ static void acm_svr_receive(struct acm_client *client)
+ switch (msg.hdr.opcode & ACM_OP_MASK) {
+ case ACM_OP_RESOLVE:
+ atomic_inc(&counter[ACM_CNTR_RESOLVE]);
+- ret = acm_svr_resolve(client, (struct acm_resolve_msg *) &msg);
++ ret = acm_svr_resolve(client, &msg);
+ break;
+ case ACM_OP_PERF_QUERY:
+- ret = acm_svr_perf_query(client, (struct acm_perf_msg *) &msg);
++ ret = acm_svr_perf_query(client, &msg);
+ break;
+ default:
+ acm_log(0, "ERROR - unknown opcode 0x%x\n", msg.hdr.opcode);
diff --git a/src/libacm.c b/src/libacm.c
index 5331b2c..11b88da 100644
--- a/src/libacm.c
+++ /dev/null
-Bottom: 721f7edb21f23623f4465fb7a0b8c028b939ca7c
-Top: e0a0e3640045b6523d936c9e4e08ff4148ab1d01
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2011-06-30 11:12:47 -0700
-
-Refresh of alias
-
----
-
-diff --git a/src/acm.c b/src/acm.c
-index 82d5972..5d0e423 100644
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -409,7 +409,7 @@ static void acm_release_sa_dest(struct acm_dest *dest)
- //}
-
- static struct acm_request *
--acm_alloc_req(struct acm_client *client, struct acm_resolve_msg *msg)
-+acm_alloc_req(struct acm_client *client, struct acm_msg *msg)
- {
- struct acm_request *req;
-
-@@ -1005,11 +1005,10 @@ acm_send_addr_resp(struct acm_ep *ep, struct acm_dest *dest)
- }
-
- static int
--acm_client_resolve_resp(struct acm_client *client, struct acm_resolve_msg *req_msg,
-+acm_client_resolve_resp(struct acm_client *client, struct acm_msg *req_msg,
- struct acm_dest *dest, uint8_t status)
- {
- struct acm_msg msg;
-- struct acm_resolve_msg *resp_msg = (struct acm_resolve_msg *) &msg;
- int ret;
-
- acm_log(2, "client %d, status 0x%x\n", client->index, status);
-@@ -1027,28 +1026,29 @@ acm_client_resolve_resp(struct acm_client *client, struct acm_resolve_msg *req_m
- goto release;
- }
-
-- resp_msg->hdr = req_msg->hdr;
-- resp_msg->hdr.opcode |= ACM_OP_ACK;
-- resp_msg->hdr.status = status;
-- resp_msg->hdr.length = ACM_MSG_HDR_LENGTH;
-- memset(resp_msg->hdr.data, 0, sizeof(resp_msg->hdr.data));
-+ msg.hdr = req_msg->hdr;
-+ msg.hdr.opcode |= ACM_OP_ACK;
-+ msg.hdr.status = status;
-+ msg.hdr.length = ACM_MSG_HDR_LENGTH;
-+ memset(msg.hdr.data, 0, sizeof(msg.hdr.data));
-
- if (status == ACM_STATUS_SUCCESS) {
-- resp_msg->hdr.length += ACM_MSG_EP_LENGTH;
-- resp_msg->data[0].flags = IBV_PATH_FLAG_GMP |
-+ msg.hdr.length += ACM_MSG_EP_LENGTH;
-+ msg.resolve_data[0].flags = IBV_PATH_FLAG_GMP |
- IBV_PATH_FLAG_PRIMARY | IBV_PATH_FLAG_BIDIRECTIONAL;
-- resp_msg->data[0].type = ACM_EP_INFO_PATH;
-- resp_msg->data[0].info.path = dest->path;
-+ msg.resolve_data[0].type = ACM_EP_INFO_PATH;
-+ msg.resolve_data[0].info.path = dest->path;
-
- if (req_msg->hdr.src_out) {
-- resp_msg->hdr.length += ACM_MSG_EP_LENGTH;
-- memcpy(&resp_msg->data[1], &req_msg->data[req_msg->hdr.src_out],
-+ msg.hdr.length += ACM_MSG_EP_LENGTH;
-+ memcpy(&msg.resolve_data[1],
-+ &req_msg->resolve_data[req_msg->hdr.src_out],
- ACM_MSG_EP_LENGTH);
- }
- }
-
-- ret = send(client->sock, (char *) resp_msg, resp_msg->hdr.length, 0);
-- if (ret != resp_msg->hdr.length)
-+ ret = send(client->sock, (char *) &msg, msg.hdr.length, 0);
-+ if (ret != msg.hdr.length)
- acm_log(0, "ERROR - failed to send response\n");
- else
- ret = 0;
-@@ -1073,8 +1073,7 @@ acm_complete_queued_req(struct acm_dest *dest, uint8_t status)
- lock_release(&dest->lock);
-
- acm_log(2, "completing request, client %d\n", req->client->index);
-- acm_client_resolve_resp(req->client,
-- (struct acm_resolve_msg *) &req->msg, dest, status);
-+ acm_client_resolve_resp(req->client, &req->msg, dest, status);
- acm_free_req(req);
-
- lock_acquire(&dest->lock);
-@@ -1286,7 +1285,7 @@ static void acm_process_acm_recv(struct acm_ep *ep, struct ibv_wc *wc, struct ac
-
- static int
- acm_client_query_resp(struct acm_client *client,
-- struct acm_resolve_msg *msg, uint8_t status)
-+ struct acm_msg *msg, uint8_t status)
- {
- int ret;
-
-@@ -1316,20 +1315,19 @@ static void
- acm_client_sa_resp(struct acm_send_msg *msg, struct ibv_wc *wc, struct acm_mad *mad)
- {
- struct acm_request *req = (struct acm_request *) msg->context;
-- struct acm_resolve_msg *client_req = (struct acm_resolve_msg *) &req->msg;
- struct ib_sa_mad *sa_mad = (struct ib_sa_mad *) mad;
- uint8_t status;
-
- if (mad) {
- status = (uint8_t) (ntohs(sa_mad->status) >> 8);
-- memcpy(&client_req->data[0].info.path, sa_mad->data,
-+ memcpy(&req->msg.resolve_data[0].info.path, sa_mad->data,
- sizeof(struct ibv_path_record));
- } else {
- status = ACM_STATUS_ETIMEDOUT;
- }
- acm_log(2, "status 0x%x\n", status);
-
-- acm_client_query_resp(req->client, client_req, status);
-+ acm_client_query_resp(req->client, &req->msg, status);
- acm_free_req(req);
- }
-
-@@ -1815,7 +1813,7 @@ acm_get_ep(struct acm_ep_addr_data *data)
- }
-
- static int
--acm_svr_query_path(struct acm_client *client, struct acm_resolve_msg *msg)
-+acm_svr_query_path(struct acm_client *client, struct acm_msg *msg)
- {
- struct acm_request *req;
- struct acm_send_msg *sa_msg;
-@@ -1830,7 +1828,7 @@ acm_svr_query_path(struct acm_client *client, struct acm_resolve_msg *msg)
- goto resp;
- }
-
-- ep = acm_get_ep(&msg->data[0]);
-+ ep = acm_get_ep(&msg->resolve_data[0]);
- if (!ep) {
- acm_log(1, "notice - could not find local end point\n");
- status = ACM_STATUS_ESRCADDR;
-@@ -1861,8 +1859,9 @@ acm_svr_query_path(struct acm_client *client, struct acm_resolve_msg *msg)
- mad = (struct ib_sa_mad *) sa_msg->data;
- acm_init_path_query(mad);
-
-- memcpy(mad->data, &msg->data[0].info.path, sizeof(struct ibv_path_record));
-- mad->comp_mask = acm_path_comp_mask(&msg->data[0].info.path);
-+ memcpy(mad->data, &msg->resolve_data[0].info.path,
-+ sizeof(struct ibv_path_record));
-+ mad->comp_mask = acm_path_comp_mask(&msg->resolve_data[0].info.path);
-
- atomic_inc(&counter[ACM_CNTR_ROUTE_QUERY]);
- acm_post_send(&ep->sa_queue, sa_msg);
-@@ -1986,7 +1985,7 @@ out:
- * and we'll resolve a source address later.
- */
- static uint8_t
--acm_svr_verify_resolve(struct acm_resolve_msg *msg,
-+acm_svr_verify_resolve(struct acm_msg *msg,
- struct acm_ep_addr_data **saddr, struct acm_ep_addr_data **daddr)
- {
- struct acm_ep_addr_data *src = NULL, *dst = NULL;
-@@ -1999,27 +1998,29 @@ acm_svr_verify_resolve(struct acm_resolve_msg *msg,
-
- cnt = (msg->hdr.length - ACM_MSG_HDR_LENGTH) / ACM_MSG_EP_LENGTH;
- for (i = 0; i < cnt; i++) {
-- if (msg->data[i].flags & ACM_EP_FLAG_SOURCE) {
-+ if (msg->resolve_data[i].flags & ACM_EP_FLAG_SOURCE) {
- if (src) {
- acm_log(0, "ERROR - multiple sources specified\n");
- return ACM_STATUS_ESRCADDR;
- }
-- if (!msg->data[i].type || (msg->data[i].type >= ACM_ADDRESS_RESERVED)) {
-+ if (!msg->resolve_data[i].type ||
-+ (msg->resolve_data[i].type >= ACM_ADDRESS_RESERVED)) {
- acm_log(0, "ERROR - unsupported source address type\n");
- return ACM_STATUS_ESRCTYPE;
- }
-- src = &msg->data[i];
-+ src = &msg->resolve_data[i];
- }
-- if (msg->data[i].flags & ACM_EP_FLAG_DEST) {
-+ if (msg->resolve_data[i].flags & ACM_EP_FLAG_DEST) {
- if (dst) {
- acm_log(0, "ERROR - multiple destinations specified\n");
- return ACM_STATUS_EDESTADDR;
- }
-- if (!msg->data[i].type || (msg->data[i].type >= ACM_ADDRESS_RESERVED)) {
-+ if (!msg->resolve_data[i].type ||
-+ (msg->resolve_data[i].type >= ACM_ADDRESS_RESERVED)) {
- acm_log(0, "ERROR - unsupported destination address type\n");
- return ACM_STATUS_EDESTTYPE;
- }
-- dst = &msg->data[i];
-+ dst = &msg->resolve_data[i];
- }
- }
-
-@@ -2030,7 +2031,7 @@ acm_svr_verify_resolve(struct acm_resolve_msg *msg,
-
- if (!src) {
- msg->hdr.src_out = i;
-- src = &msg->data[i];
-+ src = &msg->resolve_data[i];
- memset(src, 0, sizeof *src);
- }
- *saddr = src;
-@@ -2041,7 +2042,7 @@ acm_svr_verify_resolve(struct acm_resolve_msg *msg,
- /* Caller must hold dest lock */
- static uint8_t
- acm_svr_queue_req(struct acm_dest *dest, struct acm_client *client,
-- struct acm_resolve_msg *msg)
-+ struct acm_msg *msg)
- {
- struct acm_request *req;
-
-@@ -2056,7 +2057,7 @@ acm_svr_queue_req(struct acm_dest *dest, struct acm_client *client,
- }
-
- static int
--acm_svr_resolve_dest(struct acm_client *client, struct acm_resolve_msg *msg)
-+acm_svr_resolve_dest(struct acm_client *client, struct acm_msg *msg)
- {
- struct acm_ep *ep;
- struct acm_dest *dest;
-@@ -2147,7 +2148,7 @@ put:
- * lookup the destination by either LID or GID.
- */
- static int
--acm_svr_resolve_path(struct acm_client *client, struct acm_resolve_msg *msg)
-+acm_svr_resolve_path(struct acm_client *client, struct acm_msg *msg)
- {
- struct acm_ep *ep;
- struct acm_dest *dest;
-@@ -2162,22 +2163,22 @@ acm_svr_resolve_path(struct acm_client *client, struct acm_resolve_msg *msg)
- return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_EINVAL);
- }
-
-- path = &msg->data[0].info.path;
-+ path = &msg->resolve_data[0].info.path;
- if (!path->dlid && ib_any_gid(&path->dgid)) {
- acm_log(0, "notice - no destination specified\n");
- return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_EDESTADDR);
- }
-
-- acm_format_name(2, log_data, sizeof log_data,
-- ACM_EP_INFO_PATH, msg->data[0].info.addr, sizeof *path);
-+ acm_format_name(2, log_data, sizeof log_data, ACM_EP_INFO_PATH,
-+ msg->resolve_data[0].info.addr, sizeof *path);
- acm_log(2, "path %s\n", log_data);
-- ep = acm_get_ep(&msg->data[0]);
-+ ep = acm_get_ep(&msg->resolve_data[0]);
- if (!ep) {
- acm_log(0, "notice - unknown local end point\n");
- return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_ESRCADDR);
- }
-
-- addr = msg->data[1].info.addr;
-+ addr = msg->resolve_data[1].info.addr;
- memset(addr, 0, ACM_MAX_ADDRESS);
- if (path->dlid) {
- * ((uint16_t *) addr) = path->dlid;
-@@ -2210,7 +2211,7 @@ acm_svr_resolve_path(struct acm_client *client, struct acm_resolve_msg *msg)
- }
- /* fall through */
- default:
-- if (msg->data[0].flags & ACM_FLAGS_NODELAY) {
-+ if (msg->resolve_data[0].flags & ACM_FLAGS_NODELAY) {
- acm_log(2, "lookup initiated, but client wants no delay\n");
- status = ACM_STATUS_ENODATA;
- break;
-@@ -2230,10 +2231,10 @@ put:
- return ret;
- }
-
--static int acm_svr_resolve(struct acm_client *client, struct acm_resolve_msg *msg)
-+static int acm_svr_resolve(struct acm_client *client, struct acm_msg *msg)
- {
-- if (msg->data[0].type == ACM_EP_INFO_PATH) {
-- if (msg->data[0].flags & ACM_FLAGS_QUERY_SA) {
-+ if (msg->resolve_data[0].type == ACM_EP_INFO_PATH) {
-+ if (msg->resolve_data[0].flags & ACM_FLAGS_QUERY_SA) {
- return acm_svr_query_path(client, msg);
- } else {
- return acm_svr_resolve_path(client, msg);
-@@ -2243,7 +2244,7 @@ static int acm_svr_resolve(struct acm_client *client, struct acm_resolve_msg *ms
- }
- }
-
--static int acm_svr_perf_query(struct acm_client *client, struct acm_perf_msg *msg)
-+static int acm_svr_perf_query(struct acm_client *client, struct acm_msg *msg)
- {
- int ret, i;
-
-@@ -2256,7 +2257,7 @@ static int acm_svr_perf_query(struct acm_client *client, struct acm_perf_msg *ms
- msg->hdr.length = ACM_MSG_HDR_LENGTH + (ACM_MAX_COUNTER * sizeof(uint64_t));
-
- for (i = 0; i < ACM_MAX_COUNTER; i++)
-- msg->data[i] = (uint64_t) atomic_get(&counter[i]);
-+ msg->perf_data[i] = (uint64_t) atomic_get(&counter[i]);
-
- ret = send(client->sock, (char *) msg, msg->hdr.length, 0);
- if (ret != msg->hdr.length)
-@@ -2288,10 +2289,10 @@ static void acm_svr_receive(struct acm_client *client)
- switch (msg.hdr.opcode & ACM_OP_MASK) {
- case ACM_OP_RESOLVE:
- atomic_inc(&counter[ACM_CNTR_RESOLVE]);
-- ret = acm_svr_resolve(client, (struct acm_resolve_msg *) &msg);
-+ ret = acm_svr_resolve(client, &msg);
- break;
- case ACM_OP_PERF_QUERY:
-- ret = acm_svr_perf_query(client, (struct acm_perf_msg *) &msg);
-+ ret = acm_svr_perf_query(client, &msg);
- break;
- default:
- acm_log(0, "ERROR - unknown opcode 0x%x\n", msg.hdr.opcode);