#ifdef HAVE_IB_MAP_MR_SG
#ifdef HAVE_IB_MAP_MR_SG_5ARGS
n = ib_map_mr_sg(mr, tx->tx_frags,
- tx->tx_nfrags, NULL, PAGE_SIZE);
+ rd->rd_nfrags, NULL, PAGE_SIZE);
#else
n = ib_map_mr_sg(mr, tx->tx_frags,
- tx->tx_nfrags, PAGE_SIZE);
+ rd->rd_nfrags, PAGE_SIZE);
#endif
- if (unlikely(n != tx->tx_nfrags)) {
+ if (unlikely(n != rd->rd_nfrags)) {
CERROR("Failed to map mr %d/%d "
- "elements\n", n, tx->tx_nfrags);
+ "elements\n", n, rd->rd_nfrags);
return n < 0 ? n : -EINVAL;
}
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;
}