Version: 1
-Previous: 64472c6ead62880ffa81b539608a60d3338de8b9
-Head: 6f4507038104ae5e2a16a357380d583df9cd0d59
+Previous: b58c7a60332e3f036d4cf5837550695f95d10561
+Head: ad96cb65cbc55867845e127991947d6cc3010a04
Applied:
dyn_ah: 6f4507038104ae5e2a16a357380d583df9cd0d59
+ refresh-temp: ad96cb65cbc55867845e127991947d6cc3010a04
Unapplied:
addr_size: 8de02c47fbf595132105a7050ad6f755f49f9a7a
Hidden:
--- /dev/null
+Bottom: 4a725c3b21d37e7ff6d4e2430fc69ddf4d72920a
+Top: ff1f0e0cc0c31d7a9b01b551462a6a3a0612e4b9
+Author: Sean Hefty <sean.hefty@intel.com>
+Date: 2011-04-01 15:47:48 -0700
+
+Refresh of dyn_ah
+
+---
+
+diff --git a/src/acm.c b/src/acm.c
+index 15f2631..0dbc23c 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -164,6 +164,7 @@ struct acm_send_msg
+ DLIST_ENTRY entry;
+ struct acm_ep *ep;
+ struct acm_dest *dest;
++ struct ibv_ah *ah;
+ void *context;
+ void (*resp_handler)(struct acm_send_msg *req,
+ struct ibv_wc *wc, struct acm_mad *resp);
+@@ -724,22 +725,32 @@ static void acm_process_join_resp(struct acm_ep *ep, struct ib_user_mad *umad)
+ mc_rec = (struct ib_mc_member_rec *) mad->data;
+ lock_acquire(&ep->lock);
+ index = acm_mc_index(ep, &mc_rec->mgid);
+- if (index >= 0) {
+- dest = &ep->mc_dest[index];
+- dest->remote_qpn = IB_MC_QPN;
+- dest->mgid = mc_rec->mgid;
+- acm_record_mc_av(ep->port, mc_rec, dest);
++ if (index < 0) {
++ acm_log(0, "ERROR - MGID in join response not found\n");
++ goto out;
++ }
++
++ dest = &ep->mc_dest[index];
++ dest->remote_qpn = IB_MC_QPN;
++ dest->mgid = mc_rec->mgid;
++ acm_record_mc_av(ep->port, mc_rec, dest);
++
++ if (index == 0) {
+ dest->ah = ibv_create_ah(ep->port->dev->pd, &dest->av);
++ if (!dest->ah) {
++ acm_log(0, "ERROR - unable to create ah\n");
++ goto out;
++ }
+ ret = ibv_attach_mcast(ep->qp, &mc_rec->mgid, mc_rec->mlid);
+ if (ret) {
+ acm_log(0, "ERROR - unable to attach QP to multicast group\n");
+- } else {
+- dest->state = ACM_READY;
+- acm_log(1, "join successful\n");
++ goto out;
+ }
+- } else {
+- acm_log(0, "ERROR - MGID in join response not found\n");
+ }
++
++ dest->state = ACM_READY;
++ acm_log(1, "join successful\n");
++out:
+ lock_release(&ep->lock);
+ }