* Which is ok.
*/
if (ptl_rc != PTL_OK && ptl_rc != PTL_IFACE_DUP) {
- CERROR ("PtlNIInit: error %d\n", ptl_rc);
+ CERROR ("PtlNIInit: error %s(%d)\n",
+ kptllnd_errtype2str(ptl_rc), ptl_rc);
rc = -EINVAL;
goto failed;
}
kptllnd_eq_callback, /* handler callback */
&kptllnd_data.kptl_eqh); /* output handle */
if (ptl_rc != PTL_OK) {
- CERROR("PtlEQAlloc failed %d\n", ptl_rc);
+ CERROR("PtlEQAlloc failed %s(%d)\n",
+ kptllnd_errtype2str(ptl_rc), ptl_rc);
rc = -ENOMEM;
goto failed;
}
ptl_rc = PtlGetId(kptllnd_data.kptl_nih,
&kptllnd_data.kptl_portals_id);
if (ptl_rc != PTL_OK) {
- CERROR ("PtlGetID: error %d\n", ptl_rc);
+ CERROR ("PtlGetID: error %s(%d)\n",
+ kptllnd_errtype2str(ptl_rc), ptl_rc);
rc = -EINVAL;
goto failed;
}
if (!PtlHandleIsEqual(kptllnd_data.kptl_eqh, PTL_INVALID_HANDLE)) {
prc = PtlEQFree(kptllnd_data.kptl_eqh);
if (prc != PTL_OK)
- CERROR("Error %d freeing portals EQ\n", prc);
+ CERROR("Error %s(%d) freeing portals EQ\n",
+ kptllnd_errtype2str(prc), prc);
}
if (!PtlHandleIsEqual(kptllnd_data.kptl_nih, PTL_INVALID_HANDLE)) {
prc = PtlNIFini(kptllnd_data.kptl_nih);
if (prc != PTL_OK)
- CERROR("Error %d finalizing portals NI\n", prc);
+ CERROR("Error %s(%d) finalizing portals NI\n",
+ kptllnd_errtype2str(prc), prc);
}
LASSERT (atomic_read(&kptllnd_data.kptl_ntx) == 0);
ptlrc = PtlMDBind(kptllnd_data.kptl_nih, tx->tx_rdma_md,
PTL_UNLINK, &mdh);
if (ptlrc != PTL_OK) {
- CERROR("PtlMDBind(%s) failed: %d\n",
- libcfs_id2str(peer->peer_id), ptlrc);
+ CERROR("PtlMDBind(%s) failed: %s(%d)\n",
+ libcfs_id2str(peer->peer_id),
+ kptllnd_errtype2str(ptlrc), ptlrc);
tx->tx_status = -EIO;
kptllnd_tx_decref(tx);
return -EIO;
0); /* offset */
if (ptlrc != PTL_OK) {
- CERROR("Ptl%s failed: %d\n",
- (type == TX_TYPE_GET_RESPONSE) ? "Put" : "Get", ptlrc);
+ CERROR("Ptl%s failed: %s(%d)\n",
+ (type == TX_TYPE_GET_RESPONSE) ? "Put" : "Get",
+ kptllnd_errtype2str(ptlrc), ptlrc);
kptllnd_peer_close(peer, -EIO);
/* Everything (including this RDMA) queued on the peer will
prc = PtlMDBind(kptllnd_data.kptl_nih, md, PTL_UNLINK, &msg_mdh);
if (prc != PTL_OK) {
- CERROR("PtlMDBind(%s) failed: %d\n",
- libcfs_id2str(peer->peer_id), prc);
+ CERROR("PtlMDBind(%s) failed: %s(%d)\n",
+ libcfs_id2str(peer->peer_id),
+ kptllnd_errtype2str(prc), prc);
tx->tx_status = -EIO;
kptllnd_tx_decref(tx);
return;
PTL_INS_BEFORE,
&meh);
if (rc != PTL_OK) {
- CERROR("PtlMEAttach(%s) failed: %d\n",
- libcfs_id2str(peer->peer_id), rc);
+ CERROR("PtlMEAttach(%s) failed: %s(%d)\n",
+ libcfs_id2str(peer->peer_id),
+ kptllnd_errtype2str(rc), rc);
goto failed;
}
rc = PtlMDAttach(meh, tx->tx_rdma_md, PTL_UNLINK,
&tx->tx_rdma_mdh);
if (rc != PTL_OK) {
- CERROR("PtlMDAttach(%s) failed: %d\n",
- libcfs_id2str(tx->tx_peer->peer_id), rc);
+ CERROR("PtlMDAttach(%s) failed: %s(%d)\n",
+ libcfs_id2str(tx->tx_peer->peer_id),
+ kptllnd_errtype2str(rc), rc);
rc = PtlMEUnlink(meh);
LASSERT(rc == PTL_OK);
tx->tx_rdma_mdh = PTL_INVALID_HANDLE;
0, /* offset */
0); /* header data */
if (rc != PTL_OK) {
- CERROR("PtlPut %s error %d\n",
- libcfs_id2str(peer->peer_id), rc);
+ CERROR("PtlPut %s error %s(%d)\n",
+ libcfs_id2str(peer->peer_id),
+ kptllnd_errtype2str(rc), rc);
goto failed;
}
PTL_INS_AFTER,
&meh);
if (rc != PTL_OK) {
- CERROR("PtlMeAttach rxb failed %d\n", rc);
+ CERROR("PtlMeAttach rxb failed %s(%d)\n",
+ kptllnd_errtype2str(rc), rc);
goto failed;
}
return;
}
- CERROR("PtlMDAttach rxb failed %d\n", rc);
+ CERROR("PtlMDAttach rxb failed %s(%d)\n",
+ kptllnd_errtype2str(rc), rc);
rc = PtlMEUnlink(meh);
LASSERT(rc == PTL_OK);
LASSERT (ev->type == PTL_EVENT_UNLINK ||
ev->match_bits == LNET_MSG_MATCHBITS);
- if (ev->ni_fail_type != PTL_NI_OK)
+ if (ev->ni_fail_type != PTL_NI_OK) {
CERROR("Portals error from %s: %s(%d) rxb=%p fail=%s(%d) unlink=%dn",
kptllnd_ptlid2str(ev->initiator),
kptllnd_evtype2str(ev->type), ev->type, rxb,
kptllnd_errtype2str(ev->ni_fail_type),
ev->ni_fail_type, unlinked);
- if (ev->type == PTL_EVENT_PUT_END &&
- ev->ni_fail_type == PTL_NI_OK &&
- !rxbp->rxbp_shutdown) {
+ } else if (ev->type == PTL_EVENT_PUT_END &&
+ !rxbp->rxbp_shutdown) {
/* rxbp_shutdown sampled without locking! I only treat it as a
* hint since shutdown can start while rx's are queued on
rc = PtlMDBind(kptllnd_data.kptl_nih, md, PTL_UNLINK, &mdh);
if (rc != PTL_OK) {
- CWARN("Can't NAK %s: bind failed %d\n",
- kptllnd_ptlid2str(rx->rx_initiator), rc);
+ CWARN("Can't NAK %s: bind failed %s(%d)\n",
+ kptllnd_ptlid2str(rx->rx_initiator),
+ kptllnd_errtype2str(rc), rc);
return;
}
LNET_MSG_MATCHBITS, 0, 0);
if (rc != PTL_OK)
- CWARN("Can't NAK %s: put failed %d\n",
- kptllnd_ptlid2str(rx->rx_initiator), rc);
+ CWARN("Can't NAK %s: put failed %s(%d)\n",
+ kptllnd_ptlid2str(rx->rx_initiator),
+ kptllnd_errtype2str(rc), rc);
}
void
srcid.nid = msg->ptlm_srcnid;
srcid.pid = msg->ptlm_srcpid;
- CDEBUG(D_NETTRACE, "%s: RX %s c %d %p rxb %p queued %lu ticks\n",
+ CDEBUG(D_NETTRACE, "%s: RX %s c %d %p rxb %p queued %lu ticks (%ld s)\n",
libcfs_id2str(srcid), kptllnd_msgtype2str(msg->ptlm_type),
- msg->ptlm_credits, rx, rx->rx_rxb, jiffies - rx->rx_treceived);
+ msg->ptlm_credits, rx, rx->rx_rxb,
+ jiffies - rx->rx_treceived,
+ cfs_duration_sec(jiffies - rx->rx_treceived));
if (srcid.nid != kptllnd_ptl2lnetnid(rx->rx_initiator.nid)) {
CERROR("Bad source id %s from %s\n",
rc = PtlNIInit(PTL_IFACE_DEFAULT, plni->plni_ptllnd_pid,
NULL, NULL, &plni->plni_nih);
if (rc != PTL_OK && rc != PTL_IFACE_DUP) {
- CERROR("PtlNIInit failed: %d\n", rc);
+ CERROR("PtlNIInit failed: %s(%d)\n",
+ ptllnd_errtype2str(rc), rc);
rc = -ENODEV;
goto failed2;
}
rc = PtlEQAlloc(plni->plni_nih, plni->plni_eq_size,
PTL_EQ_HANDLER_NONE, &plni->plni_eqh);
if (rc != PTL_OK) {
- CERROR("PtlEQAlloc failed: %d\n", rc);
+ CERROR("PtlEQAlloc failed: %s(%d)\n",
+ ptllnd_errtype2str(rc), rc);
rc = -ENODEV;
goto failed3;
}
/*
* Fetch the Portals NID
*/
- if(rc != PtlGetId(plni->plni_nih,&plni->plni_portals_id)){
- CERROR ("PtlGetID failed : %d\n", rc);
+ rc = PtlGetId(plni->plni_nih, &plni->plni_portals_id);
+ if (rc != PTL_OK) {
+ CERROR ("PtlGetID failed : %s(%d)\n",
+ ptllnd_errtype2str(rc), rc);
rc = -EINVAL;
goto failed4;
}
anyid, LNET_MSG_MATCHBITS, 0,
PTL_UNLINK, PTL_INS_AFTER, &meh);
if (rc != PTL_OK) {
- CERROR("PtlMEAttach failed: %d\n", rc);
+ CERROR("PtlMEAttach failed: %s(%d)\n",
+ ptllnd_errtype2str(rc), rc);
return -ENOMEM;
}
if (rc == PTL_OK)
return 0;
- CERROR("PtlMDAttach failed: %d\n", rc);
+ CERROR("PtlMDAttach failed: %s(%d)\n",
+ ptllnd_errtype2str(rc), rc);
buf->plb_posted = 0;
plni->plni_nposted_buffers--;
rc = PtlMDBind(plni->plni_nih, md, LNET_UNLINK, &mdh);
if (rc != PTL_OK) {
- CERROR("PtlMDBind for %s failed: %d\n",
- libcfs_id2str(peer->plp_id), rc);
+ CERROR("PtlMDBind for %s failed: %s(%d)\n",
+ libcfs_id2str(peer->plp_id),
+ ptllnd_errtype2str(rc), rc);
tx->tx_status = -EIO;
ptllnd_tx_done(tx);
break;
rc = PtlPut(mdh, PTL_NOACK_REQ, peer->plp_ptlid,
plni->plni_portal, 0, LNET_MSG_MATCHBITS, 0, 0);
if (rc != PTL_OK) {
- CERROR("PtlPut for %s failed: %d\n",
- libcfs_id2str(peer->plp_id), rc);
+ CERROR("PtlPut for %s failed: %s(%d)\n",
+ libcfs_id2str(peer->plp_id),
+ ptllnd_errtype2str(rc), rc);
tx->tx_status = -EIO;
ptllnd_tx_done(tx);
break;
rc = PtlMEAttach(plni->plni_nih, plni->plni_portal, peer->plp_ptlid,
matchbits, 0, PTL_UNLINK, PTL_INS_BEFORE, &meh);
if (rc != PTL_OK) {
- CERROR("PtlMEAttach for %s failed: %d\n",
- libcfs_id2str(peer->plp_id), rc);
+ CERROR("PtlMEAttach for %s failed: %s(%d)\n",
+ libcfs_id2str(peer->plp_id),
+ ptllnd_errtype2str(rc), rc);
rc = -EIO;
goto failed;
}
rc = PtlMDAttach(meh, md, LNET_UNLINK, &mdh);
if (rc != PTL_OK) {
- CERROR("PtlMDAttach for %s failed: %d\n",
- libcfs_id2str(peer->plp_id), rc);
+ CERROR("PtlMDAttach for %s failed: %s(%d)\n",
+ libcfs_id2str(peer->plp_id),
+ ptllnd_errtype2str(rc), rc);
rc2 = PtlMEUnlink(meh);
LASSERT (rc2 == PTL_OK);
rc = -EIO;
rc = PtlMDBind(plni->plni_nih, md, LNET_UNLINK, &mdh);
if (rc != PTL_OK) {
- CERROR("PtlMDBind for %s failed: %d\n",
- libcfs_id2str(peer->plp_id), rc);
+ CERROR("PtlMDBind for %s failed: %s(%d)\n",
+ libcfs_id2str(peer->plp_id),
+ ptllnd_errtype2str(rc), rc);
rc = -EIO;
goto failed;
}
if (rc == PTL_OK)
return 0;
- CERROR("Can't initiate RDMA with %s: %d\n",
- libcfs_id2str(peer->plp_id), rc);
+ CERROR("Can't initiate RDMA with %s: %s(%d)\n",
+ libcfs_id2str(peer->plp_id),
+ ptllnd_errtype2str(rc), rc);
tx->tx_lnetmsg = NULL;
failed: