(time - cm->timer)/1000,
cm->hca->ib_trans.rep_time << cm->retries);
cm->retries++;
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_REQ_RETRY);
dapl_os_unlock(&cm->lock);
dapli_cm_connect(cm->ep, cm);
return;
(time - cm->timer)/1000,
cm->hca->ib_trans.rtu_time << cm->retries);
cm->retries++;
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_REP_RETRY);
dapl_os_unlock(&cm->lock);
ucm_reply(cm);
return;
(time - cm->timer)/1000,
cm->hca->ib_trans.rtu_time << cm->retries);
cm->retries++;
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_DREQ_RETRY);
dapl_os_unlock(&cm->lock);
dapli_cm_disconnect(cm);
return;
polled++;
goto retry;
}
+ DAPL_CNTR_DATA(((DAPL_IA *)dapl_llist_peek_head(&tp->hca->ia_list_head)), DCNT_IA_CM_ERR_REQ_FULLQ, polled > 1 ? 1:0);
+ DAPL_CNTR_DATA(((DAPL_IA *)dapl_llist_peek_head(&tp->hca->ia_list_head)), DCNT_IA_CM_REQ_FULLQ_POLL, polled - 1);
return msg;
}
ntohs(smsg.daddr.ib.lid),
ntohl(smsg.dqpn), ntohs(smsg.dport));
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&tp->hca->ia_list_head)), DCNT_IA_CM_ERR_REJ_TX);
return (ucm_send(tp, &smsg, NULL, 0));
}
ntohl(cm->msg.d_id));
cm->msg.op = htons(DCM_RTU);
- ucm_send(&cm->hca->ib_trans, &cm->msg, NULL, 0);
+ ucm_send(&cm->hca->ib_trans, &cm->msg, NULL, 0);
+
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_RTU_RETRY);
}
dapl_os_unlock(&cm->lock);
break;
cm->msg.op = htons(DCM_DREP);
ucm_send(&cm->hca->ib_trans, &cm->msg, NULL, 0);
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_DREP_RETRY);
+
} else if (ntohs(msg->op) != DCM_DREP){
/* DREP ok to ignore, any other print warning */
dapl_log(DAPL_DBG_TYPE_WARN,
cm, dapl_cm_op_str(ntohs(msg->op)),
dapl_cm_state_str(cm->state),
ntohs(msg->sport), ntohl(msg->sqpn));
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_UNEXPECTED);
}
dapl_os_unlock(&cm->lock);
break;
ntohs(cm->msg.saddr.ib.lid), ntohs(cm->msg.sport),
ntohl(cm->msg.sqpn), ntohl(cm->msg.saddr.ib.qpn));
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_REQ_DUP);
+
return NULL;
}
}
ntohs(msg->sport), ntohl(msg->sqpn),
ntohl(msg->saddr.ib.qpn), ntohl(msg->s_id),
ntohl(msg->d_id));
+
+ if (ntohs(msg->op) == DCM_DREP) {
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_DREP_DUP);
+ }
}
return found;
cm->msg.op = htons(DCM_DREQ);
finalize = 0; /* wait for DREP, wakeup timer after DREQ sent */
wakeup = 1;
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_DREQ_TX);
break;
case DCM_DISC_PENDING:
/* DREQ timeout, resend until retries exhausted */
htons(cm->msg.dport));
finalize = 1;
}
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_DREQ_RETRY);
break;
case DCM_DISC_RECV:
/* CM_THREAD: move to err state to flush, if not UD */
/* DREQ received, send DREP and schedule event, finalize */
cm->msg.op = htons(DCM_DREP);
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_DREP_TX);
break;
case DCM_DISCONNECTED:
dapl_os_unlock(&cm->lock);
goto bail;
}
dapl_os_unlock(&cm->lock);
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)),
+ ep->qp_handle->qp_type == IBV_QPT_UD ? DCNT_IA_CM_AH_REQ_TX : DCNT_IA_CM_REQ_TX);
return DAT_SUCCESS;
bail:
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR);
dapl_log(DAPL_DBG_TYPE_WARN,
" connect: snd ERR -> cm_lid %x cm_qpn %x r_psp %x p_sz=%d\n",
htons(cm->msg.daddr.ib.lid),
ntohs(msg->daddr.ib.lid), ntohl(msg->daddr.ib.qpn),
ntohs(msg->dport), ntohs(msg->saddr.ib.lid),
ntohl(msg->saddr.ib.qpn), ntohs(msg->sport));
-
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_REJ_RX);
event = IB_CME_DESTINATION_REJECT;
}
if (event != IB_CME_CONNECTED) {
goto bail;
}
dapl_os_unlock(&cm->lock);
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_RTU_TX);
/* init cm_handle and post the event with private data */
dapl_dbg_log(DAPL_DBG_TYPE_EP, " ACTIVE: connected!\n");
if (event != DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED)
dapli_cm_free(cm);
+
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_AH_RESOLVED);
+
} else
#endif
{
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ACTIVE_EST);
dapl_evd_connection_callback(cm,
IB_CME_CONNECTED,
cm->msg.p_data, ntohs(cm->msg.p_size), cm->ep);
(DAT_COUNT)ntohs(acm->msg.p_size),
(DAT_PVOID *)acm->msg.p_data,
(DAT_PVOID *)&xevent);
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_AH_REQ_TX);
} else
#endif
/* trigger CR event and return SUCCESS */
bail:
/* schedule work thread cleanup */
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR);
dapli_cm_free(acm);
return;
}
(DAT_COUNT)ntohs(cm->msg.p_size),
(DAT_PVOID *)cm->msg.p_data,
(DAT_PVOID *)&xevent);
+
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_AH_RESOLVED);
dapli_cm_free(cm); /* still attached to EP */
} else {
#endif
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_PASSIVE_EST);
dapls_cr_callback(cm, IB_CME_CONNECTED, NULL, 0, cm->sp);
}
dapl_log(DAPL_DBG_TYPE_CM_EST,
ntohl(cm->msg.dqpn));
return;
bail:
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR);
dapls_cr_callback(cm, IB_CME_LOCAL_FAILURE, NULL, 0, cm->sp);
dapli_cm_free(cm);
}
}
dapl_os_unlock(&cm->lock);
+ DAPL_CNTR(ia, DCNT_IA_CM_REP_TX);
dapl_dbg_log(DAPL_DBG_TYPE_CM, " PASSIVE: accepted!\n");
dapls_thread_signal(&cm->hca->ib_trans.signal);
return DAT_SUCCESS;
bail:
+ DAPL_CNTR(ia, DCNT_IA_CM_ERR);
dapli_cm_free(cm);
return DAT_INTERNAL_ERROR;
}
/* queue up listen socket to process inbound CR's */
cm->state = DCM_LISTEN;
dapli_queue_listen(cm);
+ DAPL_CNTR(ia, DCNT_IA_CM_LISTEN);
return DAT_SUCCESS;
}
else
cm->msg.op = htons(DCM_REJ_CM);
+ DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)),
+ reason == IB_CM_REJ_REASON_CONSUMER_REJ ?
+ DCNT_IA_CM_USER_REJ_TX : DCNT_IA_CM_ERR_REJ_TX);
+
if (ucm_send(&cm->hca->ib_trans, &cm->msg, pdata, psize)) {
dapl_log(DAPL_DBG_TYPE_WARN,
" cm_reject: send ERR: %s\n", strerror(errno));