]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
pop (CONFLICT)
authorSean Hefty <sean.hefty@intel.com>
Thu, 30 Jun 2011 19:16:56 +0000 (12:16 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 30 Jun 2011 19:16:56 +0000 (12:16 -0700)
meta
patches/alias

diff --git a/meta b/meta
index 2be6bbb450661feb01510d8cd55bba5172460aa4..4c8f934c4dada375e44837ee8bd6e319209c3ea4 100644 (file)
--- a/meta
+++ b/meta
@@ -1,11 +1,11 @@
 Version: 1
-Previous: 0b82d8df3cbdaa2e58911fa8f4c88633137f5ccf
+Previous: f9c91c862e974f56e131ccc5919e81305fe370af
 Head: 08f5745aac20ead15004d7449491bc56fe80e1b5
 Applied:
   bldwrn: be4fb9a97bdc0942c04ffddca19692ccf5875878
+  alias: 08f5745aac20ead15004d7449491bc56fe80e1b5
 Unapplied:
   counters: a05cd1bff001cccf8fbd7d6c8fd857f9e65671b2
-  alias: 932116870da9774875033d0676df7317fb18ffb2
   acm1.0.5: 1b225173756cfcec4d81d26b1160ebae7644261b
   name2ip: 8e00708e882239292492e13aa51c82042255933c
   addr_size: 8de02c47fbf595132105a7050ad6f755f49f9a7a
index 79962d0232ed38e9eacf0405dd391b9a13db1be7..2e29cd036c8c2b6f7098bb6d0f39787ac358e1a5 100644 (file)
@@ -1,5 +1,5 @@
-Bottom: c3c2e3b02cd74f01128072b300204a147b5b08c2
-Top:    e0a0e3640045b6523d936c9e4e08ff4148ab1d01
+Bottom: e765fa59f4b0f7553f2337f6e820cb778449cfbe
+Top:    e765fa59f4b0f7553f2337f6e820cb778449cfbe
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2011-06-29 17:28:57 -0700
 
@@ -10,511 +10,4 @@ Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 
 ---
 
-diff --git a/include/infiniband/acm.h b/include/infiniband/acm.h
-index 23d8198..7a06161 100644
---- a/include/infiniband/acm.h
-+++ b/include/infiniband/acm.h
-@@ -115,8 +115,12 @@ struct acm_perf_msg {
- };
- struct acm_msg {
--      struct acm_hdr          hdr;
--      uint8_t                 data[ACM_MSG_DATA_LENGTH];
-+      struct acm_hdr                  hdr;
-+      union{
-+              uint8_t                 data[ACM_MSG_DATA_LENGTH];
-+              struct acm_ep_addr_data resolve_data[0];
-+              uint64_t                perf_data[0];
-+      };
- };
- #endif /* ACM_H */
-diff --git a/src/acm.c b/src/acm.c
-index 54b2411..5d0e423 100644
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -181,6 +181,12 @@ struct acm_request {
-       struct acm_msg    msg;
- };
-+union socket_addr {
-+      struct sockaddr     sa;
-+      struct sockaddr_in  sin;
-+      struct sockaddr_in6 sin6;
-+};
-+
- static DLIST_ENTRY dev_list;
- static atomic_t tid;
-@@ -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)
- {
--      struct sockaddr_in6 addr;
-+      union socket_addr addr;
-       socklen_t len;
-       int ret;
-       SOCKET s;
-@@ -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:
--              ((struct sockaddr_in *) &addr)->sin_family = AF_INET;
--              memcpy(&((struct sockaddr_in *) &addr)->sin_addr, dst->info.addr, 4);
-+              addr.sin.sin_family = AF_INET;
-+              memcpy(&addr.sin.sin_addr, dst->info.addr, 4);
-               len = sizeof(struct sockaddr_in);
-               break;
-       case ACM_EP_INFO_ADDRESS_IP6:
--              addr.sin6_family = AF_INET6;
--              memcpy(&addr.sin6_addr, dst->info.addr, 16);
-+              addr.sin6.sin6_family = AF_INET6;
-+              memcpy(&addr.sin6.sin6_addr, dst->info.addr, 16);
-               len = sizeof(struct sockaddr_in6);
-               break;
-       default:
-@@ -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;
-       }
--      s = socket(addr.sin6_family, SOCK_DGRAM, IPPROTO_UDP);
-+      s = socket(addr.sa.sa_family, SOCK_DGRAM, IPPROTO_UDP);
-       if (s == INVALID_SOCKET) {
-               acm_log(0, "ERROR - unable to allocate socket\n");
-               return socket_errno();
-       }
--      ret = connect(s, &addr, len);
-+      ret = connect(s, &addr.sa, len);
-       if (ret) {
-               acm_log(0, "ERROR - unable to connect socket\n");
-               ret = socket_errno();
-               goto out;
-       }
--      ret = getsockname(s, &addr, &len);
-+      ret = getsockname(s, &addr.sa, &len);
-       if (ret) {
-               acm_log(0, "ERROR - failed to get socket address\n");
-               ret = socket_errno();
-@@ -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) {
--              memcpy(&src->info.addr, &((struct sockaddr_in *) &addr)->sin_addr, 4);
-+              memcpy(&src->info.addr, &addr.sin.sin_addr, 4);
-       } else {
--              memcpy(&src->info.addr, &((struct sockaddr_in6 *) &addr)->sin6_addr, 16);
-+              memcpy(&src->info.addr, &addr.sin6.sin6_addr, 16);
-       }
- 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
-+++ b/src/libacm.c
-@@ -111,7 +111,7 @@ void ib_acm_disconnect(void)
-       }
- }
--static int acm_format_resp(struct acm_resolve_msg *msg,
-+static int acm_format_resp(struct acm_msg *msg,
-       struct ibv_path_data **paths, int *count)
- {
-       struct ibv_path_data *path_data;
-@@ -127,25 +127,28 @@ static int acm_format_resp(struct acm_resolve_msg *msg,
-               return -1;
-       for (i = 0; i < addr_cnt; i++) {
--              switch (msg->data[i].type) {
-+              switch (msg->resolve_data[i].type) {
-               case ACM_EP_INFO_PATH:
--                      path_data[i].flags = msg->data[i].flags;
--                      path_data[i].path  = msg->data[i].info.path;
-+                      path_data[i].flags = msg->resolve_data[i].flags;
-+                      path_data[i].path  = msg->resolve_data[i].info.path;
-                       (*count)++;
-                       break;
-               default:
--                      if (!(msg->data[i].flags & ACM_EP_FLAG_SOURCE))
-+                      if (!(msg->resolve_data[i].flags & ACM_EP_FLAG_SOURCE))
-                               goto err;
--                      switch (msg->data[i].type) {
-+                      switch (msg->resolve_data[i].type) {
-                       case ACM_EP_INFO_ADDRESS_IP:
--                              inet_ntop(AF_INET, msg->data[i].info.addr, addr, sizeof addr);
-+                              inet_ntop(AF_INET, msg->resolve_data[i].info.addr,
-+                                      addr, sizeof addr);
-                               break;
-                       case ACM_EP_INFO_ADDRESS_IP6:
--                              inet_ntop(AF_INET6, msg->data[i].info.addr, addr, sizeof addr);
-+                              inet_ntop(AF_INET6, msg->resolve_data[i].info.addr,
-+                                      addr, sizeof addr);
-                               break;
-                       case ACM_EP_INFO_NAME:
--                              memcpy(addr, msg->data[i].info.name, ACM_MAX_ADDRESS);
-+                              memcpy(addr, msg->resolve_data[i].info.name,
-+                                      ACM_MAX_ADDRESS);
-                               break;
-                       default:
-                               goto err;
-@@ -220,7 +223,6 @@ static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
-       struct ibv_path_data **paths, int *count, uint32_t flags)
- {
-       struct acm_msg msg;
--      struct acm_resolve_msg *resolve_msg = (struct acm_resolve_msg *) &msg;
-       int ret, cnt = 0;
-       lock_acquire(&lock);
-@@ -229,13 +231,13 @@ static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
-       msg.hdr.opcode = ACM_OP_RESOLVE;
-       if (src) {
--              ret = acm_format_ep_addr(&resolve_msg->data[cnt++], src, type,
-+              ret = acm_format_ep_addr(&msg.resolve_data[cnt++], src, type,
-                       ACM_EP_FLAG_SOURCE);
-               if (ret)
-                       goto out;
-       }
--      ret = acm_format_ep_addr(&resolve_msg->data[cnt++], dest, type,
-+      ret = acm_format_ep_addr(&msg.resolve_data[cnt++], dest, type,
-               ACM_EP_FLAG_DEST | flags);
-       if (ret)
-               goto out;
-@@ -255,7 +257,7 @@ static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
-               goto out;
-       }
--      ret = acm_format_resp(resolve_msg, paths, count);
-+      ret = acm_format_resp(&msg, paths, count);
- out:
-       lock_release(&lock);
-       return ret;
-@@ -292,7 +294,7 @@ int ib_acm_resolve_path(struct ibv_path_record *path, uint32_t flags)
-       msg.hdr.opcode = ACM_OP_RESOLVE;
-       msg.hdr.length = ACM_MSG_HDR_LENGTH + ACM_MSG_EP_LENGTH;
--      data = &((struct acm_resolve_msg *) &msg)->data[0];
-+      data = &msg.resolve_data[0];
-       data->flags = flags;
-       data->type = ACM_EP_INFO_PATH;
-       data->info.path = *path;
-@@ -317,7 +319,6 @@ out:
- int ib_acm_query_perf(uint64_t **counters, int *count)
- {
-       struct acm_msg msg;
--      struct acm_perf_msg *perf_msg = (struct acm_perf_msg *) &msg;
-       int ret;
-       lock_acquire(&lock);
-@@ -345,7 +346,7 @@ int ib_acm_query_perf(uint64_t **counters, int *count)
-               goto out;
-       }
--      memcpy(*counters, perf_msg->data, sizeof(uint64_t) * msg.hdr.data[0]);
-+      memcpy(*counters, &msg.perf_data, sizeof(uint64_t) * msg.hdr.data[0]);
-       *count = msg.hdr.data[0];
-       ret = 0;
- out:
+