DAT_RETURN dapls_ib_open_hca(IN IB_HCA_NAME hca_name, IN DAPL_HCA * hca_ptr)
{
struct ibv_device **dev_list;
+ union dcm_addr *ucm_ia = &hca_ptr->hca_address;
struct ibv_port_attr port_attr;
int i;
DAT_RETURN dat_status;
hca_ptr->port_num,
inet_ntoa(((struct sockaddr_in *)
&hca_ptr->hca_address)->sin_addr));
- dapl_log(DAPL_DBG_TYPE_UTIL,
- " open_hca: QPN 0x%x LID 0x%x GID %s\n",
- ntohl(hca_ptr->ib_trans.addr.ib.qpn),
- ntohs(hca_ptr->ib_trans.addr.ib.lid),
- inet_ntop(AF_INET6, hca_ptr->ib_trans.addr.ib.gid,
- gid_str, sizeof(gid_str)));
/* save LID, GID, QPN, PORT address information, for ia_queries */
/* Set AF_INET6 to insure callee address storage of 28 bytes */
&hca_ptr->ib_trans.addr,
sizeof(union dcm_addr));
+ dapl_log(DAPL_DBG_TYPE_CM, " UCM IA: AF %d LID 0x%x QPN 0x%x GID"
+ " 0x" F64x ":" F64x " port %d sl %d qt %d\n",
+ ucm_ia->ib.family, ntohl(ucm_ia->ib.qpn), ntohs(ucm_ia->ib.lid),
+ (unsigned long long)ntohll(*(uint64_t*)&ucm_ia->ib.gid[0]),
+ (unsigned long long)ntohll(*(uint64_t*)&ucm_ia->ib.gid[8]),
+ ucm_ia->ib.port, ucm_ia->ib.sl, ucm_ia->ib.qp_type);
+
#ifdef DAT_IB_COLLECTIVES
if (dapli_create_collective_service(hca_ptr))
goto bail;
struct ibv_sge sge;
int i, mlen = sizeof(ib_cm_msg_t);
int hlen = sizeof(struct ibv_grh); /* hdr included with UD recv */
+ char *rbuf;
dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " ucm_create: \n");
recv_wr.num_sge = 1;
sge.length = mlen + hlen;
sge.lkey = tp->mr_rbuf->lkey;
+ rbuf = tp->rbuf;
for (i = 0; i < tp->qpe; i++) {
- recv_wr.wr_id =
- (uintptr_t)((char *)&tp->rbuf[i] +
- sizeof(struct ibv_grh));
- sge.addr = (uintptr_t) &tp->rbuf[i];
+ recv_wr.wr_id = (uintptr_t) (rbuf + hlen);
+ sge.addr = (uintptr_t) rbuf;
if (ibv_post_recv(tp->qp, &recv_wr, &recv_err))
goto bail;
+ rbuf += sge.length;
}
/* save qp_num as part of ia_address, network order */