@@ -1737,10 +1737,11 @@ int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx,
}
n = ib_map_mr_sg(mr, tx->tx_frags,
- tx->tx_nfrags, NULL, PAGE_SIZE);
- if (unlikely(n != tx->tx_nfrags)) {
+ rd->rd_nfrags, NULL,
+ PAGE_SIZE);
+ if (unlikely(n != rd->rd_nfrags)) {
CERROR("Failed to map mr %d/%d elements\n",
- n, tx->tx_nfrags);
+ n, rd->rd_nfrags);
return n < 0 ? n : -EINVAL;
}
@@ -595,7 +595,8 @@ static int kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx *tx, int type,
fps = net->ibn_fmr_ps[cpt];
rc = kiblnd_fmr_pool_map(fps, tx, rd, nob, 0, &tx->tx_fmr);
if (rc) {
- CERROR("Can't map %u bytes: %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;
}