]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Fri, 1 Apr 2011 23:42:52 +0000 (16:42 -0700)
committerSean Hefty <sean.hefty@intel.com>
Fri, 1 Apr 2011 23:42:52 +0000 (16:42 -0700)
meta
patches/dyn_ah
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index 79602da8fc70c76273c131b70466a23504771c07..7fd1996ea7fb61fbbf12ccb0d3ff1dbc6126257a 100644 (file)
--- a/meta
+++ b/meta
@@ -1,11 +1,10 @@
 Version: 1
-Previous: cc5db718b24d972bd207464a68a63195b2f68770
-Head: b5702af7c169e3fba0b4a1f3486a4b5767762573
+Previous: b26e370e9fe90262edd8b1119b88159f444bb1b0
+Head: cb5ff3ef664771b3c243847abef220e0151063ee
 Applied:
   opt_mc_av: 1c9cb4576f95c0d2cc7bf96d33cc6efe5f6c313d
   one_mc_join: ef3728004507256635ad95161cd92811661affbe
-  dyn_ah: 690668987a981187282450e2934090b6ccb15f1b
-  refresh-temp: b5702af7c169e3fba0b4a1f3486a4b5767762573
+  dyn_ah: cb5ff3ef664771b3c243847abef220e0151063ee
 Unapplied:
   addr_size: 8de02c47fbf595132105a7050ad6f755f49f9a7a
 Hidden:
index bc4a9a1521a7e1fc965197c3ab6e8b3d0573363c..d2d64ce4db99381c9b0b263bb532e2aa5a78cd57 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: c93d236ca31c4be364371bb05930f374530864e6
-Top:    0f7e548ae7fb3b8c706fb9b466adfb81accbd129
+Top:    e8b5bb1cf92f403d8767fc1d61cb8c538da64fe3
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2011-04-01 16:03:40 -0700
 
@@ -22,10 +22,68 @@ Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 ---
 
 diff --git a/src/acm.c b/src/acm.c
-index 7c6cd11..641fc2d 100644
+index 7c6cd11..53a8e7b 100644
 --- a/src/acm.c
 +++ b/src/acm.c
-@@ -775,7 +775,6 @@ static uint8_t
+@@ -450,20 +450,30 @@ acm_alloc_send(struct acm_ep *ep, struct acm_dest *dest, size_t size)
+       msg->mr = ibv_reg_mr(ep->port->dev->pd, msg->data, size, 0);
+       if (!msg->mr) {
+               acm_log(0, "ERROR - failed to register send buffer\n");
+-              goto err;
++              goto err1;
++      }
++
++      if (!dest->ah) {
++              msg->ah = ibv_create_ah(ep->port->dev->pd, &dest->av);
++              if (!msg->ah) {
++                      acm_log(0, "ERROR - unable to create ah\n");
++                      goto err2;
++              }
++              msg->wr.wr.ud.ah = msg->ah;
++      } else {
++              msg->wr.wr.ud.ah = dest->ah;
+       }
++      acm_log(2, "get dest %s\n", dest->name);
++      (void) atomic_inc(&dest->refcnt);
++      msg->dest = dest;
++
+       msg->wr.next = NULL;
+       msg->wr.sg_list = &msg->sge;
+       msg->wr.num_sge = 1;
+       msg->wr.opcode = IBV_WR_SEND;
+       msg->wr.send_flags = IBV_SEND_SIGNALED;
+       msg->wr.wr_id = (uintptr_t) msg;
+-
+-      acm_log(2, "get dest %s\n", dest->name);
+-      (void) atomic_inc(&dest->refcnt);
+-      msg->dest = dest;
+-      msg->wr.wr.ud.ah = dest->ah;
+       msg->wr.wr.ud.remote_qpn = dest->remote_qpn;
+       msg->wr.wr.ud.remote_qkey = ACM_QKEY;
+@@ -472,7 +482,10 @@ acm_alloc_send(struct acm_ep *ep, struct acm_dest *dest, size_t size)
+       msg->sge.addr = (uintptr_t) msg->data;
+       acm_log(2, "%p\n", msg);
+       return msg;
+-err:
++
++err2:
++      ibv_dereg_mr(msg->mr);
++err1:
+       free(msg);
+       return NULL;
+ }
+@@ -491,6 +504,8 @@ acm_init_send_req(struct acm_send_msg *msg, void *context,
+ static void acm_free_send(struct acm_send_msg *msg)
+ {
+       acm_log(2, "%p\n", msg);
++      if (msg->ah)
++              ibv_destroy_ah(msg->ah);
+       ibv_dereg_mr(msg->mr);
+       acm_put_dest(msg->dest);
+       free(msg);
+@@ -775,7 +790,6 @@ static uint8_t
  acm_record_acm_route(struct acm_ep *ep, struct acm_dest *dest)
  {
        int i;
@@ -33,7 +91,7 @@ index 7c6cd11..641fc2d 100644
  
        acm_log(2, "\n");
        for (i = 0; i < MAX_EP_MC; i++) {
-@@ -790,18 +789,8 @@ acm_record_acm_route(struct acm_ep *ep, struct acm_dest *dest)
+@@ -790,18 +804,8 @@ acm_record_acm_route(struct acm_ep *ep, struct acm_dest *dest)
        dest->path = ep->mc_dest[i].path;
        dest->path.dgid = dest->av.grh.dgid;
        dest->path.dlid = htons(dest->av.dlid);
@@ -54,7 +112,7 @@ index 7c6cd11..641fc2d 100644
  }
  
  static void acm_init_path_query(struct ib_sa_mad *mad)
-@@ -1097,15 +1086,6 @@ acm_dest_sa_resp(struct acm_send_msg *msg, struct ibv_wc *wc, struct acm_mad *ma
+@@ -1097,15 +1101,6 @@ acm_dest_sa_resp(struct acm_send_msg *msg, struct ibv_wc *wc, struct acm_mad *ma
        if (!status) {
                memcpy(&dest->path, sa_mad->data, sizeof(dest->path));
                acm_init_path_av(msg->ep->port, dest);
@@ -70,7 +128,7 @@ index 7c6cd11..641fc2d 100644
                dest->state = ACM_READY;
        } else {
                dest->state = ACM_INIT;
-@@ -1165,7 +1145,6 @@ acm_process_addr_req(struct acm_ep *ep, struct ibv_wc *wc, struct acm_mad *mad)
+@@ -1165,7 +1160,6 @@ acm_process_addr_req(struct acm_ep *ep, struct ibv_wc *wc, struct acm_mad *mad)
                        break;
  
                acm_log(2, "src service has new qp, resetting\n");
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index 91421d2..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-Bottom: 0f7e548ae7fb3b8c706fb9b466adfb81accbd129
-Top:    e8b5bb1cf92f403d8767fc1d61cb8c538da64fe3
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2011-04-01 16:42:52 -0700
-
-Refresh of dyn_ah
-
----
-
-diff --git a/src/acm.c b/src/acm.c
-index 641fc2d..53a8e7b 100644
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -450,20 +450,30 @@ acm_alloc_send(struct acm_ep *ep, struct acm_dest *dest, size_t size)
-       msg->mr = ibv_reg_mr(ep->port->dev->pd, msg->data, size, 0);
-       if (!msg->mr) {
-               acm_log(0, "ERROR - failed to register send buffer\n");
--              goto err;
-+              goto err1;
-+      }
-+
-+      if (!dest->ah) {
-+              msg->ah = ibv_create_ah(ep->port->dev->pd, &dest->av);
-+              if (!msg->ah) {
-+                      acm_log(0, "ERROR - unable to create ah\n");
-+                      goto err2;
-+              }
-+              msg->wr.wr.ud.ah = msg->ah;
-+      } else {
-+              msg->wr.wr.ud.ah = dest->ah;
-       }
-+      acm_log(2, "get dest %s\n", dest->name);
-+      (void) atomic_inc(&dest->refcnt);
-+      msg->dest = dest;
-+
-       msg->wr.next = NULL;
-       msg->wr.sg_list = &msg->sge;
-       msg->wr.num_sge = 1;
-       msg->wr.opcode = IBV_WR_SEND;
-       msg->wr.send_flags = IBV_SEND_SIGNALED;
-       msg->wr.wr_id = (uintptr_t) msg;
--
--      acm_log(2, "get dest %s\n", dest->name);
--      (void) atomic_inc(&dest->refcnt);
--      msg->dest = dest;
--      msg->wr.wr.ud.ah = dest->ah;
-       msg->wr.wr.ud.remote_qpn = dest->remote_qpn;
-       msg->wr.wr.ud.remote_qkey = ACM_QKEY;
-@@ -472,7 +482,10 @@ acm_alloc_send(struct acm_ep *ep, struct acm_dest *dest, size_t size)
-       msg->sge.addr = (uintptr_t) msg->data;
-       acm_log(2, "%p\n", msg);
-       return msg;
--err:
-+
-+err2:
-+      ibv_dereg_mr(msg->mr);
-+err1:
-       free(msg);
-       return NULL;
- }
-@@ -491,6 +504,8 @@ acm_init_send_req(struct acm_send_msg *msg, void *context,
- static void acm_free_send(struct acm_send_msg *msg)
- {
-       acm_log(2, "%p\n", msg);
-+      if (msg->ah)
-+              ibv_destroy_ah(msg->ah);
-       ibv_dereg_mr(msg->mr);
-       acm_put_dest(msg->dest);
-       free(msg);