]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Thu, 30 Jun 2011 00:35:59 +0000 (17:35 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 30 Jun 2011 00:35:59 +0000 (17:35 -0700)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index ae048ab3f11c78d983f2af779cccb66aa15e32b5..1ead45d91f03befa590a73c58ae1ee8c14d7b566 100644 (file)
--- a/meta
+++ b/meta
@@ -1,11 +1,12 @@
 Version: 1
-Previous: 93880ac666c08debf7a7d83e97c8ec625ef63346
-Head: 76137f6a8472a917ccd351871c664027324fea95
+Previous: 1a6d6659c9c333c8cdb144e18fe63f7e63076bb4
+Head: 4887ffbf54fd111f1ec4c30d1948e790daa6590f
 Applied:
   deam: 3eb8f395f9a52f04c5b408812e743566e6d673fe
   braces: b6e7734ccc3d5e6103ae137025ec71b6bea39a63
   counters: ff3d79a44beb17d1ba7e3eb724de877ae0eeebb5
   bld: 76137f6a8472a917ccd351871c664027324fea95
+  refresh-temp: 4887ffbf54fd111f1ec4c30d1948e790daa6590f
 Unapplied:
   acm1.0.5: 1b225173756cfcec4d81d26b1160ebae7644261b
   name2ip: 8e00708e882239292492e13aa51c82042255933c
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..fdf75a7
--- /dev/null
@@ -0,0 +1,131 @@
+Bottom: ed43fb0fa39a4f3f51411e8cb67ee3b7271e74c3
+Top:    cd42f24f71f72296a1e200caad51f1dc74bc3f0b
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2011-06-29 17:35:59 -0700
+
+Refresh of bld
+
+---
+
+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/libacm.c b/src/libacm.c
+index 5331b2c..b57710a 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;
+@@ -129,8 +129,8 @@ static int acm_format_resp(struct acm_resolve_msg *msg,
+       for (i = 0; i < addr_cnt; i++) {
+               switch (msg->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:
+@@ -139,13 +139,16 @@ static int acm_format_resp(struct acm_resolve_msg *msg,
+                       switch (msg->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: