}
/* set inline max with env or default, get local lid and gid 0 */
- if (hca_ptr->ib_hca_handle->device->transport_type == IBV_TRANSPORT_IWARP)
- hca_ptr->ib_trans.max_inline_send =
- dapl_os_get_env_val("DAPL_MAX_INLINE",
- INLINE_SEND_IWARP_DEFAULT);
- else
- hca_ptr->ib_trans.max_inline_send =
- dapl_os_get_env_val("DAPL_MAX_INLINE",
- INLINE_SEND_IB_DEFAULT);
+ if (dapl_ib_inline_data(hca_ptr->ib_hca_handle)) {
+ if (hca_ptr->ib_hca_handle->device->transport_type == IBV_TRANSPORT_IWARP)
+ hca_ptr->ib_trans.max_inline_send =
+ dapl_os_get_env_val("DAPL_MAX_INLINE",
+ INLINE_SEND_IWARP_DEFAULT);
+ else
+ hca_ptr->ib_trans.max_inline_send =
+ dapl_os_get_env_val("DAPL_MAX_INLINE",
+ INLINE_SEND_IB_DEFAULT);
+ }
/* set CM timer defaults */
hca_ptr->ib_trans.max_cm_timeout =
return;
}
+STATIC _INLINE_ int dapl_ib_inline_data (IN struct ibv_context *ib_ctx)
+{
+ struct ibv_qp_init_attr qp_create;
+ struct ibv_pd *ib_pd = NULL;
+ struct ibv_cq *ib_cq = NULL;
+ struct ibv_qp *ib_qp = NULL;
+ int ret = 0;
+
+ ib_pd = ibv_alloc_pd(ib_ctx);
+ if (!ib_pd)
+ goto bail;
+
+ ib_cq = ibv_create_cq(ib_ctx, 10, ib_ctx, NULL, 0);
+ if (!ib_cq)
+ goto bail;
+
+ dapl_os_memzero((void *)&qp_create, sizeof(qp_create));
+ qp_create.qp_type = IBV_QPT_RC;
+ qp_create.send_cq = ib_cq;
+ qp_create.recv_cq = ib_cq;
+ qp_create.cap.max_send_wr = 1;
+ qp_create.cap.max_send_sge = 1;
+ qp_create.cap.max_inline_data = 64;
+ qp_create.qp_context = (void *)ib_ctx;
+
+ ib_qp = ibv_create_qp(ib_pd, &qp_create);
+ if (ib_qp && qp_create.cap.max_inline_data >= 64)
+ ret = 1;
+bail:
+ if (ib_qp)
+ ibv_destroy_qp(ib_qp);
+ if (ib_cq)
+ ibv_destroy_cq(ib_cq);
+ if (ib_pd)
+ ibv_dealloc_pd(ib_pd);
+
+ return ret;
+}
+
/*
* Convert errno to DAT_RETURN values
*/
dapl_log(DAPL_DBG_TYPE_UTIL,
" query_hca: (%x.%x) eps %d, sz %d evds %d,"
- " sz %d mtu %d - pkey %x p_idx %d sl %d gl %d\n",
+ " sz %d mtu %d pk %x pi %d sl %d gl %d inl %d\n",
ia_attr->hardware_version_major,
ia_attr->hardware_version_minor,
ia_attr->max_eps, ia_attr->max_dto_per_ep,
ia_attr->max_evds, ia_attr->max_evd_qlen,
128 << tp->ib_cm.mtu, ntohs(tp->ib_cm.pkey),
- tp->ib_cm.pkey_idx, tp->ib_cm.sl, tp->ib_cm.global);
+ tp->ib_cm.pkey_idx, tp->ib_cm.sl,
+ tp->ib_cm.global, tp->ib_cm.max_inline);
dapl_log(DAPL_DBG_TYPE_UTIL,
" query_hca: msg %llu rdma %llu iov %d lmr %d rmr %d"
}
/* set RC tunables via enviroment or default */
- hca_ptr->ib_trans.ib_cm.max_inline =
- dapl_os_get_env_val("DAPL_MAX_INLINE", INLINE_SEND_IB_DEFAULT);
+ if (dapl_ib_inline_data(hca_ptr->ib_hca_handle)) {
+ hca_ptr->ib_trans.ib_cm.max_inline =
+ dapl_os_get_env_val("DAPL_MAX_INLINE",
+ INLINE_SEND_IB_DEFAULT);
+ }
hca_ptr->ib_trans.ib_cm.ack_retry =
dapl_os_get_env_val("DAPL_ACK_RETRY", DCM_ACK_RETRY);
hca_ptr->ib_trans.ib_cm.ack_timer =
}
/* set RC tunables via enviroment or default */
- hca_ptr->ib_trans.ib_cm.max_inline =
- dapl_os_get_env_val("DAPL_MAX_INLINE", INLINE_SEND_DEFAULT);
+ if (dapl_ib_inline_data(hca_ptr->ib_hca_handle)) {
+ hca_ptr->ib_trans.ib_cm.max_inline =
+ dapl_os_get_env_val("DAPL_MAX_INLINE",
+ INLINE_SEND_DEFAULT);
+ }
hca_ptr->ib_trans.ib_cm.ack_retry =
dapl_os_get_env_val("DAPL_ACK_RETRY", SCM_ACK_RETRY);
hca_ptr->ib_trans.ib_cm.ack_timer =
}
/* set RC tunables via enviroment or default */
- hca_ptr->ib_trans.ib_cm.max_inline =
- dapl_os_get_env_val("DAPL_MAX_INLINE", INLINE_SEND_IB_DEFAULT);
+ if (dapl_ib_inline_data(hca_ptr->ib_hca_handle)) {
+ hca_ptr->ib_trans.ib_cm.max_inline =
+ dapl_os_get_env_val("DAPL_MAX_INLINE",
+ INLINE_SEND_IB_DEFAULT);
+ }
hca_ptr->ib_trans.ib_cm.ack_retry =
dapl_os_get_env_val("DAPL_ACK_RETRY", DCM_ACK_RETRY);
hca_ptr->ib_trans.ib_cm.ack_timer =