fps = net->ibn_fmr_ps[cpt];
rc = kiblnd_fmr_pool_map(fps, tx, rd, nob, 0, &tx->tx_fmr);
if (rc != 0) {
- CERROR("Can't map %u pages: %d\n", nob, rc);
+ CERROR("Can't map %u bytes (%u/%u)s: %d\n", nob,
+ tx->tx_nfrags, rd->rd_nfrags, rc);
return rc;
}
static void
kiblnd_tx_complete(struct kib_tx *tx, int status)
{
- int failed = (status != IB_WC_SUCCESS);
+ int failed = (status != IB_WC_SUCCESS);
struct kib_conn *conn = tx->tx_conn;
- int idle;
+ int idle;
- LASSERT (tx->tx_sending > 0);
+ if (tx->tx_sending <= 0) {
+ CERROR("Received an event on a freed tx: %p status %d\n",
+ tx, tx->tx_status);
+ return;
+ }
- if (failed) {
- if (conn->ibc_state == IBLND_CONN_ESTABLISHED)
+ if (failed) {
+ if (conn->ibc_state == IBLND_CONN_ESTABLISHED)
CNETERR("Tx -> %s cookie %#llx"
- " sending %d waiting %d: failed %d\n",
- libcfs_nid2str(conn->ibc_peer->ibp_nid),
- tx->tx_cookie, tx->tx_sending, tx->tx_waiting,
- status);
+ " sending %d waiting %d: failed %d\n",
+ libcfs_nid2str(conn->ibc_peer->ibp_nid),
+ tx->tx_cookie, tx->tx_sending, tx->tx_waiting,
+ status);
- kiblnd_close_conn(conn, -EIO);
- } else {
- kiblnd_peer_alive(conn->ibc_peer);
- }
+ kiblnd_close_conn(conn, -EIO);
+ } else {
+ kiblnd_peer_alive(conn->ibc_peer);
+ }
spin_lock(&conn->ibc_lock);
return;
}
- timeout_ns = lnet_get_lnd_timeout() * NSEC_PER_SEC;
+ timeout_ns = kiblnd_timeout() * NSEC_PER_SEC;
tx->tx_queued = 1;
tx->tx_deadline = ktime_add_ns(ktime_get(), timeout_ns);
if (*kiblnd_tunables.kib_use_priv_port) {
rc = kiblnd_resolve_addr(cmid, &srcaddr, &dstaddr,
- lnet_get_lnd_timeout() * 1000);
+ kiblnd_timeout() * 1000);
} else {
rc = rdma_resolve_addr(cmid,
(struct sockaddr *)&srcaddr,
(struct sockaddr *)&dstaddr,
- lnet_get_lnd_timeout() * 1000);
+ kiblnd_timeout() * 1000);
}
if (rc != 0) {
/* Can't initiate address resolution: */
rc = event->status;
} else {
rc = rdma_resolve_route(
- cmid, lnet_get_lnd_timeout() * 1000);
+ cmid, kiblnd_timeout() * 1000);
if (rc == 0) {
struct kib_net *net = peer_ni->ibp_ni->ni_data;
struct kib_dev *dev = net->ibn_dev;
* connection within (n+1)/n times the timeout
* interval. */
- lnd_timeout = lnet_get_lnd_timeout();
+ lnd_timeout = kiblnd_timeout();
if (lnd_timeout > n * p)
chunk = (chunk * n * p) / lnd_timeout;
if (chunk == 0)